Method and apparatus for encoding/decoding video using split layer

ABSTRACT

The present invention relates to a method and an apparatus for encoding/decoding a video using a split layer. The video encoding/decoding method generates an encoded image data by encoding a current block partitioned into a plurality of subblocks, generates an encoded partition information data by encoding partition information of the current block, generates a bitstream including the encoded image data and the encoded partition information data, and then reconstructs the video image from the generated bitstream. According to the present disclosure, when encoding a high resolution video with variable sized blocks, various block shapes may be used for the encoding, and efficient encoding and decoding of the block partition information can improve the compression efficiency.

CROSS REFERENCE TO RELATED APPLICATION

This application claims the priority of Korean Patent Application No.10-2009-0093982, filed on Oct. 1, 2009, Korean Patent Application No.10-2009-0093987, filed on Oct. 1, 2009, and Korean Patent ApplicationNo. 10-2010-0096032, filed on Oct. 1, 2010 in the KIPO (KoreanIntellectual Property Office). Further, this application is the NationalPhase application of International Application No. PCT/KR2010/006735filed Oct. 1, 2010, which designates the United States and was publishedin Korean.

TECHNICAL FIELD

The present disclosure relates to a method and an apparatus forencoding/decoding an image using a split or partition layer. Moreparticularly, the present disclosure relates to a method and anapparatus, which perform an encoding and a decoding by unit of subblocksafter splitting a block into subblocks when a high resolution image isencoded using variable sized blocks and improve the compressionefficiency by efficiently encoding/decoding block partition information.

BACKGROUND ART

The statements in this section merely provide background informationrelated to the present disclosure and may not constitute prior art.

Technologies for compressing video data include H.261, H.263, H.264,MPEG-2, MPEG-4, and so on. According to such video compressionstandards, each image is divided and encoded into fixedly sizedmacroblocks formed of rectangular areas having pixels sized 16×16 ofluma component and pixels sized 8×8 of chroma component. All lumacomponents and all chroma components of each macroblock are spatially ortemporally predicted, and then a predicted residual undergoes atransform, a quantization, and an entropy coding and finally atransmission.

The most recently enacted H.264/AVC standard prescribes an encodingapparatus to use a 16×16 pixel block for the fixed macroblock size andsubdivide each macroblock into smaller blocks for which an intraprediction or an inter prediction is carried out. In carrying out theintra prediction encoding, each macroblock may be divided into 16×16,8×8, or 4×4 sizes, and the block of size 16×16 is intra predicted in oneof four prediction modes, 8×8 and 4×4 blocks are intra predicted in oneof nine prediction modes. In the case of inter prediction, themacroblock may be subdivided into blocks of sizes 16×16, 16×8, 8×16,8×8, 8×4, 4×8, or 4×4, and then used for the inter prediction through amotion compensation. The transform is performed by unit of 8×8 or 4×4sized blocks, and the quantization used for the transform coefficientsis scalar quantization.

However, since typical video compression technology uses a fixedly sizedmacroblock in encoding an image (even though H.264/AVC subdivides andencodes macroblock into smaller block units, the macroblock is of afixed size), encoding the high resolution image hardly achieves asufficient encoding efficiency.

Further, since the macroblock size is fixed, sizes of subblocks withinthe macroblock, which are the prediction or transform units, also arelimited.

DISCLOSURE Technical Problem

Therefore, aspects of the present disclosure to solve theabove-mentioned problem mainly intend to encode an image by usingvariable sized blocks and various sizes of subblocks when a highresolution image is encoded and improve the compression efficiency byefficiently encoding and decoding block partition information.

Technical Solution

An aspect of the present disclosure provides a video encoding/decodingapparatus, including a video encoder for encoding an image throughgenerating an encoded image data by encoding a current block partitionedinto a plurality of subblocks and generating an encoded partitioninformation data by encoding a partition information of the currentblock; and a video decoder for decoding the image through reconstructingthe partition information of the current block by decoding the encodedpartition information data extracted from a bitstream and reconstructingthe current block partitioned into the plurality of subblocks bydecoding the encoded image data extracted from the bitstream, accordingto a reconstructed partition information of the current block.

Another aspect of the present disclosure provides a video encodingapparatus, including a video encoder for encoding an image throughgenerating an encoded image data by encoding a current block partitionedinto a plurality of subblocks; and a partition information encoder forencoding a partition information through generating an encoded partitioninformation data by encoding the partition information of the currentblock.

Another aspect of the present disclosure provides A video encodingapparatus, including a maximum partition layer determiner fordetermining a maximum partition layer value of a current block; amaximum partition layer encoder for encoding a maximum partition layerthrough generating an encoded maximum partition layer data by encodingthe maximum partition layer value of the current block; and a videoencoder for encoding an image through generating an encoded image databy encoding the current block by using a minimum subblock sizedetermined according to a determined maximum partition layer value.

Another aspect of the present disclosure provides A video encodingapparatus, including a maximum partition layer determiner fordetermining a maximum partition layer value of a current block; amaximum partition layer encoder for encoding a maximum partition layerthrough generating an encoded maximum partition layer data by encodingthe maximum partition layer value of the current block; and a videoencoder for encoding an image through generating an encoded image databy encoding the current block by using a minimum subblock sizedetermined according to a determined maximum partition layer value.

Another aspect of the present disclosure provides a video encodingapparatus, including a macroblock size candidate setting unit forsetting macroblock size candidates; a video encoder for encoding aninput image by each of the macroblock size candidates; a macroblock sizedeterminer for determining a macroblock size based on an encoding costfor each of the macroblock size candidates, and generating a bitstreamincluding an image data encoded in a determined macroblock size andinformation on the determined macroblock size.

Another aspect of the present disclosure provides a video decodingapparatus, including a partition information decoder for decoding apartition information through reconstructing a partition information ofa current block by decoding the encoded partition information dataextracted from a bitstream; and a video decoder for decoding an imagethrough reconstructing the current block partitioned into a plurality ofsubblocks by decoding an encoded image data extracted from thebitstream, according to a reconstructed partition information of thecurrent block.

Another aspect of the present disclosure provides a video decodingapparatus, including a maximum partition layer decoder for decoding amaximum partition layer through reconstructing a maximum partition layervalue by decoding an encoded maximum partition layer data extracted froma bitstream; and a video decoder for decoding an image throughreconstructing a current block by decoding an encoded image dataextracted from the bitstream, by using a minimum subblock size dependingon a reconstructed maximum partition layer value.

Another aspect of the present disclosure provides a video decodingapparatus, including a macroblock size setting unit for setting amacroblock size through extracting a macroblock size information from abitstream and setting the macroblock size by using an extractedmacroblock size information; and a video decoder for decoding an imagethrough extracting an encoded image data from the bitstream andgenerating a reconstructed image by decoding the encoded image datadepending the macroblock size identified by the macroblock sizeinformation.

Another aspect of the present disclosure provides videoencoding/decoding method, including encoding an image through generatingan encoded image data by encoding a current block partitioned into aplurality of subblocks and generating an encoded partition informationdata by encoding a partition information of the current block; anddecoding the image through reconstructing the partition information ofthe current block by decoding the encoded partition information dataextracted from a bitstream and reconstructing the current blockpartitioned into the plurality of subblocks by decoding the encodedimage data extracted from the bitstream, according to a reconstructedpartition information of the current block.

Another aspect of the present disclosure provides a video encodingmethod, including generating an encoded image data by encoding a currentblock to undergo a partitioning into a plurality of subblocks;generating an encoded partition information data by encoding a partitioninformation of the current block; and generating a bitstream includingthe encoded image data and the encoded partition information data.

The plurality of subblocks may be square.

The partitioning may be carried out by selected one of a plurality ofpartition types.

The current block may be a macroblock exceeding 16×16 block size.

The partition information may indicate block sizes of the plurality ofsubblocks included in the current block.

The partition information may be identified by a partition typeindicating information by each of partition layers, and the step ofgenerating the encoded partition information data may encode thepartition information through sequentially encoding the partition typeindicating information by each of the partition layers based on apartition type indicating information encoding order.

The partition information may be identified by a layer number of apartition layer and a partition type indicating information, and thestep of generating the encoded partition information data may encode thepartition information through encoding the layer number of the partitionlayer and the partition type indicating information by using a treestructure.

The partitioning may utilize squares only, and the partition informationmay include partition layer values only.

The partitioning may have a rectangular block partitioned into smallerrectangular blocks.

The partition information may be identified by a partition layer valueand a partition flag, and the step of generating the encoded partitioninformation data may encode the partition information through encodingthe partition layer value and the partition flag.

The step of generating the encoded partition information data may encodethe partition information through encoding the partition layer value andthe partition flag only when the current block is an intra block type.

The plurality of subblocks may be square blocks.

Another aspect of the present disclosure provides a video encodingapparatus, including setting minimum subblock size candidates; encodingan input image by each of the minimum subblock size candidates;determining a minimum subblock size based on an encoding cost for eachof the macroblock size candidates, and generating a bitstream includingan image data encoded in a determined minimum subblock size and aninformation on the determined minimum subblock size.

The information on the determined minimum subblock size may be either aninformation on a minimum subblock size value or an information on amaximum partition layer value.

The step of determining the minimum subblock size may includedetermining a maximum partition layer value of a current block;generating an encoded maximum partition layer data by encoding themaximum partition layer value of the current block; decoding an encodedimage data through encoding the current block by using a minimumsubblock size determined depending on a determined maximum partitionlayer value; and generating a bitstream including the encoded maximumpartition layer data and the encoded image data.

The step of generating the encoded image data may encode the currentblock by using a minimum subblock size determined depending on themaximum partition layer value and subblocks determined depending on theavailability of respective layers, and the step of generating thebitstream may further include an information for indicating use ornonuse of the respective layers after partitioning in the bitstream.

The information for indicating use or nonuse of each partitioned layermay be indexes of a table generated by combining events of use or nonuseof the respective layers.

Another aspect of the present disclosure provides a video encodingapparatus, including determining available partition layers of a currentblock; selecting a partition layer for minimizing an encoding cost ofthe current block from determined available partition layers; generatingan encoded image data through encoding the current block, by using aselected partition layer; and generating a bitstream including anencoded partition layer data generated by encoding an information on theselected partition layer, an encoded partition information datagenerated by encoding a partition information of partitioning thecurrent block, and the encoded image data

Another aspect of the present disclosure provides a video encodingapparatus, including setting macroblock size candidates; encoding aninput image by each of the macroblock size candidates; determining amacroblock size based on an encoding cost for each of the macroblocksize candidates; and generating a bitstream including an image dataencoded in a determined macroblock size and an information on thedetermined macroblock size.

The information on the determined macroblock size may be an informationon the value of the macroblock size, or an information on a maximumsubblock size value and a maximum partition layer value, or anup/downscaling information on a macroblock of a predetermined size.

The information on value of the macroblock size may be a flag forindicating whether to transmit a macroblock information.

The information on the determined macroblock size may be a flag forindicating whether to use a macroblock of a reference size.

The information on the determined macroblock size may be a flag aboutwhether to use the macroblock size of a previous picture.

The information on the determined macroblock size may define differentmacroblock sizes between an intra picture and an inter picture.

The video encoding method may further include setting a referenceminimum subblock size and encoding a flag for indicating whether to usethe reference minimum subblock size in each every header of a picture, aslice, or a minimum subblock header.

A block having a size enlarged or reduced by a predetermined ratio fromthe reference minimum subblock size may be selected as a current minimumsubblock when the flag indicates that the minimum reference subblocksize is not used.

An intra picture and an inter picture may be encoded with differentminimum subblock sizes applied.

The information on the value of the macroblock size or the informationon the maximum subblock size value may be acquired by using a tabledefining block sizes.

Another aspect of the present disclosure provides a video decodingmethod, including reconstructing a partition information of a currentblock by decoding the encoded partition information data extracted froma bitstream; and reconstructing the current block to undergo apartitioning into a plurality of subblocks by decoding an encoded imagedata extracted from the bitstream, according to a reconstructedpartition information of the current block.

The partition information may be identified by a partition typeindicating information by each of partition layers.

The partition information may be identified by a layer number of apartition layer and a partition type indicating information.

The partition information may be identified by a partition layer valueand a partition flag.

The partitioning may utilize squares only, and the partition informationmay include partition layer values only.

The partitioning may have a rectangular block partitioned into smallerrectangular blocks.

Another aspect of the present disclosure provides a video decodingmethod, including reconstructing a minimum subblock size by decoding anencoded minimum subblock size data extracted from a bitstream; andreconstructing a current block by decoding an encoded image dataextracted from the bitstream, by using a reconstructed minimum subblocksize.

The encoded minimum subblock size data extracted from the bitstream maybes either an information on a minimum subblock size value or aninformation on a maximum partition layer value.

The step of generating the current block may encode the current block byusing a minimum subblock size determined depending on the maximumpartition layer value and subblocks determined depending on theavailability of respective layers.

The video decoding method may further include an information forindicating use or nonuse of the respective layers, in the form ofindexes of a table generated by combining events of use or nonuse of therespective layers.

Another aspect of the present disclosure provides a video decodingmethod, including reconstructing an information on a partition layer anda partition information by decoding an encoded partition layer data andencoded partition information data extracted from a bitstream; andreconstructing a current block by decoding an encoded image dataextracted from the bitstream, by using a reconstructed information onthe partition layer and the reconstructed partition information.

Another aspect of the present disclosure provides a video decodingmethod, including setting a macroblock size through extracting amacroblock size information from a bitstream and setting the macroblocksize by using an extracted macroblock size information; and decoding animage through extracting an encoded image data from the bitstream andgenerating a reconstructed image by decoding the encoded image datadepending the macroblock size identified by the macroblock sizeinformation.

The macroblock size information may be an information on the value ofthe macroblock size, or an information on a maximum subblock size valueand a maximum partition layer value, or an up/downscaling information ona macroblock of a predetermined size.

The information on the value of the macroblock size may be aninformation on a reference macroblock size.

The macroblock size information may be a flag about whether to use themacroblock size of a previous picture.

The macroblock size information may define different macroblock sizesbetween an intra picture and an inter picture.

The video decoding method may further include reconstructing a minimumsubblock size by setting a reference minimum subblock size and decodinga flag for indicating whether to use the reference minimum subblock sizein each every header of a picture, a slice, or a minimum subblock.

The minimum subblock size may be reconstructed by decoding aninformation for indicating an enlargement or a reduction by apredetermined ratio from the reference minimum subblock size, when theflag indicates that the minimum reference subblock size is not used.

An intra picture and an inter picture may have different minimumsubblock sizes assigned.

The information on the value of the macroblock size or the informationon the maximum subblock size value may be acquired by using a tabledefining block sizes.

Advantageous Effects

According to the present disclosure as described above, an efficientvideo encoding and decoding can be achieved by encoding an image throughthe use of variable sized macroblocks and various sizes of subblockswhen a high resolution image is encoded, and encoding and decoding blockpartition information.

DESCRIPTION OF DRAWINGS

FIGS. 1 to 3 are exemplary diagrams for illustrating macroblocks by unitof M×N pixels according to an aspect of the present disclosure,

FIGS. 4 and 5 are exemplary diagrams for illustrating various subblockmodes according to an aspect of the present disclosure,

FIG. 6 is a schematic block diagram for illustrating a video encodingapparatus according to an aspect of the present disclosure,

FIG. 7 is a schematic block diagram for illustrating a video decodingapparatus according to an aspect of the present disclosure,

FIG. 8 is a block diagram for illustrating a first implementation of avideo encoding apparatus according to another aspect of the presentdisclosure,

FIG. 9 is an exemplary diagram for illustrating subblocks split from amacroblock for each layer according to another aspect of the presentdisclosure,

FIG. 10 is an exemplary diagram for illustrating partition typesaccording to another aspect of the present disclosure,

FIG. 11 is an exemplary diagram for illustrating a macroblock split intosubblocks of various block sizes according to another aspect of thepresent disclosure,

FIG. 12 is an exemplary diagram for sequentially illustrating processesin which a macroblock is split for each partition layer,

FIG. 13 is an exemplary diagram for illustrating processes in whichpartition type indicating information of the macroblock for each layeris sequentially encoded according to a subblock order,

FIGS. 14A and 14B are exemplary diagram for illustrating a method ofencoding block partition information by using a tree structure accordingto another aspect of the present disclosure,

FIGS. 15 and 16 are exemplary diagrams for illustrating an example of amethod of encoding block partition information by using a tree structureaccording to another aspect of the present disclosure,

FIGS. 17 and 18 are exemplary diagrams for illustrating another exampleof a method of encoding block partition information by using a treestructure according to another aspect of the present disclosure,

FIG. 19 illustrates subblocks split based on a partition layer valueaccording to another aspect of the present disclosure,

FIG. 20 is an exemplary diagram for illustrating a process of encodingblock partition information by using a partition layer value and apartition flag according to another aspect of the present disclosure,

FIG. 21 is an exemplary diagram for illustrating a macroblock split intosubblocks of various block sizes according to another aspect of thepresent disclosure,

FIG. 22 is an exemplary diagram for illustrating a process ofsequentially encoding partition type indicating information for eachlayer of the macroblock according to a subblock order,

FIG. 23 is a flowchart for illustrating a video encoding methodaccording to another aspect of the present disclosure,

FIG. 24 is a schematic block diagram for illustrating a video decodingapparatus according to another aspect of the present disclosure,

FIG. 25 is a flowchart for illustrating a video encoding methodaccording to another aspect of the present disclosure,

FIG. 26 is a schematic block diagram for illustrating a video encodingapparatus according to yet another aspect of the present disclosure,

FIG. 27 is an exemplary diagram for illustrating the relation between apartition layer and a minimum subblock size according to yet anotheraspect of the present disclosure,

FIG. 28 is a flowchart for illustrating an example of a method ofdetermining a maximum partition layer value according to yet anotheraspect of the present disclosure,

FIG. 29 is a flowchart for illustrating another example of a method ofdetermining a maximum partition layer value according to yet anotheraspect of the present disclosure,

FIG. 30 is an exemplary diagram for illustrating a process of encodingpartition information of a current block by using only selectedpartition layers according to yet another aspect of the presentdisclosure,

FIG. 31 is a flowchart for illustrating a video encoding methodaccording to yet another aspect of the present disclosure,

FIG. 32 is a schematic block diagram for illustrating a video decodingapparatus according to yet another aspect of the present disclosure,

FIG. 33 is a flowchart for illustrating a video decoding methodaccording to yet another aspect of the present disclosure,

FIG. 34 is an exemplary diagram for illustrating partition typesaccording to another aspect of the present disclosure,

FIG. 35 is a schematic block diagram for illustrating a video encodingapparatus according to yet another aspect of the present disclosure,

FIG. 36 is a flowchart for illustrating an implementation of a videoencoding method according to another aspect of the present disclosure,and

FIG. 37 is a block diagram for illustrating an implementation of a videodecoding apparatus according to another aspect of the presentdisclosure.

MODE FOR INVENTION

Hereinafter, aspects of the present disclosure will be described indetail with reference to the accompanying drawings. In the followingdescription, the same elements will be designated by the same referencenumerals although they are shown in different drawings. Further, in thefollowing description of the present disclosure, a detailed descriptionof known functions and configurations incorporated herein will beomitted when it may make the subject matter of the present disclosurerather unclear.

Additionally, in describing the components of the present disclosure,there may be terms used like first, second, A, B, (a), and (b). Theseare solely for the purpose of differentiating one component from theother but not to imply or suggest the substances, order or sequence ofthe components. If a component were described as ‘connected’, ‘coupled’,or ‘linked’ to another component, they may mean the components are notonly directly ‘connected’, ‘coupled’, or ‘linked’ but also areindirectly ‘connected’, ‘coupled’, or ‘linked’ via a third component.

A video encoding apparatus and a video decoding apparatus, which will bediscussed in the following description, may be a Personal Computer (PC),a notebook computer, a Personal Digital Assistant (PDA), a PortableMultimedia Player (PMP), a PlayStation Portable (PSP), and a mobilecommunication terminal, and refer to various apparatuses including acommunication apparatus such as a communication modem for performingcommunication with various devices or a wired/wireless communicationnetwork, a memory for storing various programs and data for encoding ordecoding a video, and a microprocessor for executing a program toperform an operation and a control.

Further, a video encoded into a bitstream by a video encoding apparatusis transmitted to a video decoding apparatus through a wired/wirelesscommunication network such as an internet, a near field communicationnetwork, a wireless LAN (Local Area Network), a WiBro (WirelessBroadband) network, and a mobile communication network or through acommunication interface such as a cable or a Universal Serial Bus (USB)in real-time or non-real time and decoded in the video decodingapparatus, and thus the decoded video may be reconstructed andreproduced as a video.

In general, a video includes a series of pictures and each picture isdivided into predetermined areas such as macroblocks, which are thereference unit for encoding and decoding an image. The macroblocks areclassified into an intra macroblock and an inter macroblock according toa macroblock decoding method. The intra macroblock refers to amacroblock encoded using an intra prediction coding. The intraprediction coding corresponds to a scheme of generating a predictedblock by predicting a current block pixel by using pixels ofreconstructed blocks previously encoded and decoded within a currentpicture, in which a current encoding is performed, and encoding adifferential value between the generated predicted block and the currentblock pixel. The inter macroblock refers to a macroblock encoded usingan inter prediction coding. The inter prediction coding corresponds to ascheme of generating a predicted block by predicting a current blockwithin a current picture with reference to one or more past pictures orfuture pictures and encoding a differential value between the generatedpredicted block and the current block. Here, a picture referred to inencoding or decoding the current picture is called a reference picture.

A) Encoding and Decoding Using Macroblock or Block having Arbitrary Size

Hereinafter, an apparatus for encoding and decoding an image by unit ofblocks is described by way of an example. Here, the block may be amacroblock of size M×N (M and N may be integers equal to or larger than16) or a subblock or lower block of size O×P (O and P may be integersequal to or smaller than M or N). Encoding and decoding the image byunit of blocks are only examples, and the image can be encoded anddecoded by unit of defined areas like blocks or undefined areas.However, a video encoding/decoding apparatus, which will be describedlater, can use blocks having an arbitrary size, and the block size is aprearranged size between the video encoding apparatus and the videodecoding apparatus.

A-1) Macroblock of Arbitrary Size

FIGS. 1 to 3 are exemplary diagrams for illustrating macroblocks by unitof M×N pixels according to an aspect of the present disclosure.

FIG. 1 shows macroblocks by unit of M×N pixels (hereinafter, referred toas macroblocks of size M×N) expressed in a part of an input image havinga certain size as an example, FIG. 2 shows a CIF image including 396macroblocks of size 16×16 as an example, and FIG. 3 shows a CIF imageincluding 54 macroblocks of size 64×32 as an example.

In the conventional video compression technology, an image is split intomacroblocks of fixed size 16×16 and then encoded and decoded as shown inFIG. 2. However, in an aspect of the present disclosure, the image maybe encoded and decoded using macroblocks of size 64×32 (not only thesize 64×32 but also size M×N (greater than a size 16×16) such as size64×64 and size 32×64 are available) as shown in FIG. 3.

A-2) Example of Subblock Mode

FIGS. 4 and 5 are exemplary diagrams for illustrating various subblockmodes according to an aspect of the present disclosure.

FIG. 4 shows subblock modes available for a macroblock of size 32×32,and FIG. 5 shows subblock modes available for a macroblock of size32×16.

According to an aspect of the present disclosure, the macroblock of sizeM×N may be split into smaller blocks, that is, subblocks as shown inFIGS. 4 and 5. Macroblocks of the image may be intra predictive-encodedor inter predictive-encoded by unit of subblocks.

A-3) Description of Video Encoding Apparatus

FIG. 6 is a schematic block diagram for illustrating a video encodingapparatus according to an aspect of the present disclosure.

The video encoding apparatus according to the aspect of the presentdisclosure corresponds to an apparatus for encoding an image by usingmacroblocks having a size equal to or larger than an arbitrary size, andmay include a predictor 610, an encoder 620, a reconstructor 630, afilter 640, and a frame memory 650. Here, the reconstructor 630, thefilter 640, and the frame memory 650 may be omitted or included inanother element selectively according to an implementation manner.

The predictor 610 may include a motion estimator 612, a motioncompensator 614, and an intra predictor 616, and predicts macroblocks ofan input image. Here, the macroblocks refer to macroblocks of size equalto or larger than a size 16×16 (that is, macroblocks of size M×N, whereM and N are integers equal to or larger than 16).

The motion estimator 612 generates a motion vector by comparing amacroblock, which is desired to be predicted, with a reference picturestored in the frame memory 650 and estimating a motion of thecorresponding macroblock.

The motion compensator 614 fetches a block corresponding to a size ofthe macroblock, which is desired to be predicted, from the referencepicture stored in the frame memory 650 with reference to the motionvector generated by the motion estimator 612. The block having beenfetched by the motion compensator 614 becomes a predicted macroblockhaving a predicted value of the macroblock, which is desired to bepredicted.

The intra predictor 616 intra-predicts the block, which is desired to bepredicted. For the intra prediction, the intra predictor 616 generates areference block by using reconstructed neighboring pixel informationalready encoded and decoded, and compares the reference block with thetarget macroblock, which is to be encoded, to determine an intraprediction mode. And then, the intra predictor 606 intra-predicts themacroblock according to the determined intra prediction mode. Themacroblock having been predicted by the intra predictor 616 becomes apredicted macroblock having a predicted value of the target macroblock.

The encoder 620 encodes a residual signal, which is a difference betweenpixel values of the target macroblock and the predicted macroblock.Specifically, the encoder 620 encodes the residual signal through atransform, a quantization, and an entropy coding. Further, when theencoder 620 inter-predicts the target macroblock to be encoded, theencoder 620 can encode motion information such as the motion vectorgenerated by the motion estimator 612 and macroblock mode informationsuch as a macroblock size. When the encoder 620 intra-predicts thetarget macroblock to be encoded, the encoder 620 can encode predictionmode information such as an intra prediction mode and macroblock modeinformation such as the macroblock size.

The reconstructor 630 inversely quantizes and inversely transforms atransformed and quantized residual signal and adds the residual signaland the predicted macroblock output from the predictor 610 toreconstruct the target macroblock.

The filter 640 filters the reconstructed target macroblock by using afilter such as a deblocking filter. The filtered reconstructedmacroblock is stored in the frame memory 650 and used for interpredicting a next macroblock or a macroblock of a next picture in thepredictor 610.

A-4) Description of Video Decoding Apparatus

FIG. 7 is a schematic block diagram for illustrating a video decodingapparatus according to an aspect of the present disclosure.

The video decoding apparatus according to the aspect of the presentdisclosure may include a decoder 710, a predictor 720, a reconstructor730, a filter 740, and a frame memory.

The decoder 710 extracts three types of information required for amacroblock decoding from an input bitstream.

First, the decoder 710 entropy decodes and extracts macroblock typeinformation on whether a macroblock, which is desired to be currentlydecoded, is an intra macroblock or an inter macroblock and subblock modeinformation indicating subblock modes of the macroblock.

Second, the decoder 710 extracts information required for the predictionthrough an entropy decoding. In this event, a method of decoding a typeof prediction data to be decoded and the prediction data is differentdepending on whether each block is an intra block or an inter block.When the block to be reconstructed is the inter block, reference pictureinformation required for a motion compensation of each subblock andinformation on a motion such as a motion vector are extracted from thebitstream and decoded. When the block to be reconstructed is the interblock, information on intra prediction modes of a luma component and achroma component is extracted from the bitstream and decoded.

Lastly, the decoder 710 decodes information required for a residualsignal decoding. Information indicating whether there is a transformcoefficient which is not 0, in each subblock (e.g. CBP) is firstdecoded, and transform information indicating a transform type and aquantized transform coefficient are decoded for blocks having thetransform coefficient which is not 0.

The predictor 720 predicts a current block to be currently decoded, andmay include a motion compensator 722 and an intra predictor 724. Whenthe current block is the inter block, the motion compensator 722generates a predicted macroblock by fetching pixels corresponding to asize of the current macroblock from the reference picture stored in theframe memory 750 by using a reconstructed motion vector decoded by thedecoder 710. When the current block is the intra block, the intrapredictor 724 generates a predicted macroblock by predicting the currentmacroblock according to a reconstructed intra prediction mode decoded bythe decoder 710. After generating a residual signal by inverselyquantizing a quantized transform coefficient decoded by the decoder 710and inversely transforming the inversely quantized transform coefficientby using a reconstructed transform type extracted from the decoder 710,the reconstructor 730 generates a reconstructed macroblock by adding thegenerated residual signal and the predicted macroblock generated by thepredictor 720. The generated reconstructed macroblock is filtered in thefilter 740 and stored in the frame memory 750, and the filtered andstored macroblock is used for reconstructing a next block or a nextpicture.

As described above, the video encoding apparatus 600 and the videodecoding apparatus 700 according to an aspect of the present disclosurecan encode and decode the image by using blocks having an arbitrarysize.

B) Block Partition, and Partition Information Encoding and Decoding

Hereinafter, as another aspect of the present disclosure, an apparatusand a method for splitting a macroblock having an arbitrary size into aplurality of subblocks through a partition (or split) layer for theprediction or the transform and efficiently encoding and decodingpartition information indicating shapes and sizes of the split subblockswill be described. However, while the video encoding/decoding apparatus,which will be discussed in the following description, may usemacroblocks having an arbitrary size, alternatively, the video encodingapparatus and the video decoding apparatus may perform anencoding/decoding by using a prearranged macroblock size and aprearranged minimum subblock size between the video encoding apparatusand the video decoding apparatus.

The partition information may be information indicating sizes and shapesof subblocks split for the prediction or the transform. The videoencoding apparatus includes the partition information and encoded imagedata in a bitstream and transmits the bitstream to the video decodingapparatus.

Further, the video encoding apparatus can encode partition informationfor the prediction and partition information for the transform,respectively.

In a decoding, the video decoding apparatus extracts and decodes thepartition information from the bitstream, and splits the macroblock intoa plurality of subblocks for the prediction or the transform. Then, thevideo decoding apparatus performs the prediction or the transform in theunit of subblocks to reconstruct an image.

B-1) Video Encoding Apparatus

B-1-1) Encoding Apparatus

FIG. 8 is a schematic block diagram for illustrating a video encodingapparatus according to another aspect of the present disclosure.

The video encoding apparatus 800 according to another aspect of thepresent disclosure may include a video encoder 810 and a partitioninformation encoder 820.

The video encoding apparatus 800 of FIG. 8 encodes partition informationin the partition information encoder 820 and then encodes predicted dataand/or image data including data required for a residual signal decodingsuch as a transform type, CBP, and a transform coefficient. Here, thepredicted data corresponds to data indicating whether each subblock isan intra block or an inter block, and corresponds to an intra predictionmode for the intra block and motion information for the inter block. Thevideo encoder 810 may be implemented as the video encoding apparatus 600according to an aspect of the present disclosure described withreference to FIG. 6. That is, the video encoder 810 splits a macroblockhaving an arbitrary size into various sizes of subblocks for theprediction or the transform, performs a predictive encoding onrespective subblocks, and then determines prediction modes of therespective subblocks and a macroblock partition type having a smallestencoding cost. Partition information indicating the determinedmacroblock partition type is encoded into the bitstream through theencoder 820, and a predictive-encoded image data of the plurality ofsplit subblocks within the macroblock is generated.

The partition information encoder 820 encodes the partition informationinput by the video encoder 810 to generate partition information data.Here, the partition information may be information on sizes and blockshapes of a plurality of subblocks split from the macroblock for theprediction or the transform.

According to the typical video compression technology, since amacroblock size is fixed to a size 16×16, subblocks having a small sizesuch as subblocks of sizes 8×8, 4×4, etc. can be used. However,according to an aspect of the present disclosure, since a macroblocksize can be variously determined to have size equal to or larger than asize 16×16, sizes and shapes of subblocks can be also variouslydetermined and thus the macroblock can be split into various shapes ofsubblocks. Therefore, according to another aspect of the presentdisclosure, a predictive encoding should be performed by transmittinginformation on sizes and shapes of subblocks split from a macroblock toa video decoding apparatus and splitting the macroblock in the same wayas that performed in a video encoding apparatus in the video decodingapparatus. It is described with reference to FIGS. 9 to 22 that thepartition information encoder 820 encodes block information.

B-1-2) Subblock Mode

According to another aspect of the present disclosure, a macroblock issplit into various sizes of subblocks for each layer, and a predictiveencoding and a predictive decoding can be performed for each of thesplit subblocks.

FIG. 9 is an exemplary diagram for illustrating subblocks split from amacroblock for each layer according to another aspect of the presentdisclosure.

In FIG. 9, a macroblock size is N×N and N is an integer equal to orlarger than 16. FIG. 9 shows subblocks which can be split based on anassumption that a minimum subblock size of subblock sizes is 4×4.However, this assumption is only for describing embodiments of thepresent disclosure. A horizontal size and a vertical size of themacroblock may not be equal to each other and the minimum subblock sizemay be set to another size instead of the size 4×4.

As shown in FIG. 9, according to another aspect of the presentdisclosure, the macroblock can be split into various sizes of subblocksfor each layer. The macroblock may be split into four types of subblocksfor each of layers from a layer 0 to a layer log₂(N/4). In this event,subblocks of a K+1 layer can be used only when a subblock of a layer K(0≦K≦log 2(N/4)) is split into 4 subblocks.

For example, in a case of a macroblock of size 64×64, the macroblock maybe split into 4 layers from a layer 0 to a layer 3, and respectivelayers may include subblocks having 4 different block sizes.Accordingly, the layer 0 includes a subblock having a block size of64×64, subblocks having a block size of 64×32, subblocks having a blocksize of 32×64, and subblocks having a block size of 32×32. A layer 1includes a subblock having a block size of 32×32, subblocks having ablock size of 32×16, subblocks having a block size of 16×32, andsubblocks having a block size of 16×16. A layer 2 includes a subblockhaving a block size of 16×16, subblocks having a block size of 16×8,subblocks having a block size of 8×16, and subblocks having a block sizeof 8×8. The layer 3 includes a subblock having a block size of 8×8,subblocks having a block size of 8×4, subblocks having a block size of4×8, and subblocks having a block size of 4×4. Here, subblocks includedin the layer 1 can be used only when the macroblock having a block sizeof 64×64 is split into subblocks having a block size of 32×32 in thelayer 0, and subblocks included in the layer 2 can be used only when thesubblock having the block size 32×32 in the layer 1 is split intosubblocks having a block size of 16×16. Further, subblocks included inthe layer 3 can be used only when the subblock having the block size of16×16 of the layer 2 is split into subblocks having a block size of 8×8.

Here, when a N×N block in a layer K is split into 4 subblocks having asize of

${\frac{N}{2} \times \frac{N}{2}},$the split subblock

$\frac{N}{2} \times \frac{N}{2}$may be included in both the layer K and the layer K+1. That is, in themacroblock of size 64×64, a subblock having a size of 32×32 may bedetermined as a subblock type included in the layer 0 or a subblock typeincluded in the layer 1.

In this event, a method of allocating a layer number to the splitsubblock may be different depending on the availability of each layer.If the layer K+1 is available, a layer number K+1 is allocated to asubblock. If the layer K+1 is not available, a layer number K isallocated to the subblock.

For example, in a case where a macroblock size is 64×64 and the numberof maximum partition layers is 4, when the 64×64 macroblock is splitinto 4 subblocks of size 32×32, the 32×32 subblock is included in alayer 1. When one 32×32 subblock within the macroblock is split into 4subblocks of size 16×16, each 16×16 subblock is included in a layer 2.When each 16×16 subblock is split into 4 subblock of size 8×8, the 8×8subblock is included in a layer 3. When each 8×8 subblock is split into4 subblocks of size 4×4, the 4×4 subblock is included in the layer 3because a layer 4 is not available.

Further, when a N×N block of the layer K is split into 4 subblocks ofsize

${\frac{N}{2} \times \frac{N}{2}},$a layer number of the split

$\frac{N}{2} \times \frac{N}{2}$subblock may be allocated K. In this event, when the

$\frac{N}{2} \times \frac{N}{2}$subblock is split into smaller subblocks, the layer number of the split

$\frac{N}{2} \times \frac{N}{2}$subblock is allocated K+1.

For example, in a case where a macroblock size is 64×64 and the numberof maximum partition layers is 4, when the 64×64 macroblock is splitinto 4 subblocks of size 32×32, the 32×32 subblock is included in alayer 0. When one 32×32 subblock within the macroblock is split into 4subblocks of size 16×16, each 16×16 subblock is included in a layer 1.When each 16×16 subblock is split into 4 subblocks of size 8×8, the 8×8subblock is included in a layer 2. Further, when each 8×8 subblock issplit into 4 subblocks of size 4×4, the 4×4 subblock is included in alayer 3.

B-1-3) Partition Type

Further, the macroblock can be split by using various partition typesshown in FIGS. 10 and 34.

FIGS. 10 and 34 are exemplary diagrams for illustrating partition typesaccording to another aspect of the present disclosure.

B-1-3-1) Example 1 of Partition Types

FIG. 10 is an exemplary diagram for illustrating partition typesaccording to another aspect of the present disclosure.

FIG. 10 shows an example of partition type indicating information(partition type numbers) for identifying block sizes of subblocks splitfor each layer.

As shown in FIG. 10, when a subblock

$\frac{N}{2^{K}} \times \frac{N}{2^{K}}$included in a layer K of a macroblock is not split, partition typeindicating information is allocated “0”. When the subblock

$\frac{N}{2^{K}} \times \frac{N}{2^{K}}$is split into two subblocks of size

${\frac{N}{2^{K}} \times \frac{N}{2^{K + 1}}},$partition type indicating information is allocated “1”. When thesubblock

$\frac{N}{2^{K}} \times \frac{N}{2^{K}}$is split into two subblocks of size

${\frac{N}{2^{K + 1}} \times \frac{N}{2^{K}}},$partition type indicating information is allocated “2”. When thesubblock

$\frac{N}{2^{K}} \times \frac{N}{2^{K}}$is split into four subblocks of size

${\frac{N}{2^{K + 1}} \times \frac{N}{2^{K + 1}}},$partition type indicating information is allocated “3”. A partitionnumber refers to a number allocated to for an identification of eachsubblock split based on a partition type. For example, when the subblock

$\frac{N}{2^{K}} \times \frac{N}{2^{K}}$of the layer K is not split, a partition number of the unsplit subblock

$\frac{N}{2^{K}} \times \frac{N}{2^{K}}$is allocated “0”. Further, when the subblock

$\frac{N}{2^{K}} \times \frac{N}{2^{K}}$of the layer K is split into four subblocks of size

${\frac{N}{2^{K + 1}} \times \frac{N}{2^{K + 1}}},$the respective

$\frac{N}{2^{K + 1}} \times \frac{N}{2^{K + 1}}$subblocks may be sequentially allocated partition numbers 0, 1, 2, and 3from a subblock located in a left upper part of the macroblock in araster scan direction.

B-1-3-2) Example 2 of Partition Types

FIG. 34 is an exemplary diagram for illustrating partition typesaccording to another aspect of the present disclosure.

FIG. 34 shows an example of partition type indicating information(partition type number) for identifying block sizes of subblocks splitfor each layer.

As shown in FIG. 34, when a subblock

$\frac{N}{2^{K}} \times \frac{N}{2^{K}}$included in a layer K of a macroblock is not split, partition typeindicating information is allocated “0”. When the subblock

$\frac{N}{2^{K}} \times \frac{N}{2^{K}}$is split into four subblocks of size

${\frac{N}{2^{K + 1}} \times \frac{N}{2^{K + 1}}},$partition type indicating information is allocated “1”. A partitionnumber refers to a number allocated for an identification of eachsubblock split based on a partition type. For example, when the subblock

$\frac{N}{2^{K}} \times \frac{N}{2^{K}}$of the layer K is not split, a partition number of the unsplit subblock

$\frac{N}{2^{K}} \times \frac{N}{2^{K}}$is allocated “0”. Further, when the subblock

$\frac{N}{2^{K}} \times \frac{N}{2^{K}}$of the layer K is split into four subblocks of size

${\frac{N}{2^{K + 1}} \times \frac{N}{2^{K + 1}}},$the respective

$\frac{N}{2^{K + 1}} \times \frac{N}{2^{K + 1}}$subblocks may be sequentially allocated partition numbers 0, 1, 2, and 3from a subblock located in a left upper part of the macroblock in araster scan direction.

Further, various partition types may be combined and used for eachlayer. For example, the layer 0 and the layer 1 can use the partitiontype shown in FIG. 34 and lower layers of the layer 1 can also use thepartition type shown in FIG. 10.

B-1-4) Partition Information Encoding Method

Hereinafter, various methods of encoding partition information, which isinformation indicating sizes and shapes of subblocks used for theprediction or the transform within the macroblock, according to anaspect of the present disclosure will be described.

B-1-4-1) Partition Information Decoding Method 1

A first method of encoding partition information is first described.

According to the first method, partition information indicating a typeof a macroblock split into various sizes of subblocks may be representedusing partition type indicating information (partition type numbers) foreach layer. Accordingly, a plurality of subblocks included in amacroblock can be identified by the partition type indicatinginformation for each layer. The partition information encoder 810 canencode partition information of a block by using the partition typeindicating information for each layer through various methods, whichwill be described later.

For example, the partition information encoder 810 can encode partitioninformation of a current block by sequentially encoding partition typeindicating information for each partition layer of a macroblock based ona partition type indicating information encoding order.

Hereinafter, a method of encoding partition information of a currentblock through a sequential encoding of partition type indicatinginformation for each partition layer of a macroblock based on apartition type indicating information encoding order will be describedwith reference to FIGS. 11 to 13.

FIG. 11 is an exemplary diagram for illustrating a macroblock split intosubblocks having various block sizes according to another aspect of thepresent disclosure.

FIG. 11 shows the macroblock split into subblocks having various blocksizes based on the subblock types shown in FIG. 10, wherein themacroblock has a block size of 64×64 and the number of maximum partitionlayers is 4.

According to another aspect of the present invention, when themacroblock is split as shown in FIG. 11, partition information of themacroblock can be encoded by sequentially encoding partition typeindicating information for each partition layer based on the partitiontype indicating information encoding order.

FIG. 12 shows processes of sequentially splitting the macroblock shownin FIG. 11 for each partition layer. Referring to FIG. 12, a subblockhaving a block size of 64×64 is split into 4 subblocks having a blocksize of 32×32 in a layer 0 (L0), an L1-P0 subblock (having a partitionnumber 0 of a layer 1) and an L1-P3 subblock (having a partition number3 of the layer 1) are split into 4 subblocks having a block size of16×16, respectively (L1), and an L1-P1 subblock (having a partitionnumber 1 of the layer 1) and an L1-P2 subblock (having a partitionnumber 2 of the layer 1) are split into 2 subblocks having a block sizeof 16×32 and 2 subblocks having a block size of 32×16 in the layer 1,respectively. After the L1-P1 and L1-P2 subblocks are split into 2subblocks, respectively, the subblocks are not split any more, so thatpartition numbers of the subblocks are not illustrated in FIG. 15. AnL2-P0 subblock (having a partition number 0 of a layer 2) is split into4 subblocks having a block size of 8×8 and an L2-P subblock (having apartition number 3 of the layer 2) is split into 2 subblocks having ablock size of 16×2 in the layer 2 (L2). An L3-P0 subblock (having apartition number 0 of a layer 3) and an L3-P1 subblock (having apartition number 1 of the layer 3) are split into 4 subblocks having ablock size of 4×4 in the layer 3 (L3), respectively.

An order of encoding partition type indicating information is asfollows.

Partition type indicating information on a macroblock partition type isfirst encoded. Then, if the macroblock is split into 4 subblocks,partition type indicating information on the respective split subblocksis successively encoded. For example, when a N×N block is split into 4subblocks, partition type indicating information on a first (N/2)×(N/2)subblock is encoded. When the first (N/2)×(N/2) subblock is split into 4subblocks, partition type indicating information on the split(N/4)×(N/4) subblocks is encoded. When a size of the split (N/4)×(N/4)subblock corresponds to a minimum subblock size or when the split(N/4)×(N/4) subblock is not split into 4 smaller subblocks any more,partition type indicating information on a next (N/4)×(N/4) subblock isencoded in a raster scan order. When the size of the (N/4)×(N/4)subblock does not correspond to the minimum subblock size and the(N/4)×(N/4) subblock is split into 4 subblocks having a block size of(N/8)×(N/8), an encoding is performed from partition type indicatinginformation on a first (N/8)×(N/8) subblock. The encoding on thepartition type indicating information is continuously performed untilpartition type indicating information on all subblocks within themacroblock is encoded.

FIG. 13 is an exemplary diagram for illustrating a process ofsequentially encoding partition type indicating information for eachlayer of a macroblock.

The table shown in FIG. 13 is generated when the partition typeindicating information on respective subblocks within the macroblockshown in FIG. 11 is encoded. Numbers written in “□” of FIG. 11 refer toorders of encoding partition type indicating information of respectivesubblocks. If partition type indicating information for each layer ofthe macroblock is sequentially encoded according to a partition typeindicating information encoding order, the partition type indicatinginformation for each layer may be encoded according to the order shownin FIG. 11.

First, since the subblock (L0-P0) having the block size of 64×64 issplit into 4 subblocks having a block size of 32×32, partition typeindicating information 3 is encoded. Since the first subblock (L1-P0)having the block size of 32×32 among 4 subblocks having the block size32×32 within the subblock having the block size of 64×64 is split into 4subblocks having the block size of 16×16, partition type indicatinginformation 3 is encoded. The first subblock (L2-P0) having the blocksize of 16×16 among 4 subblocks having the block size of 16×16 withinthe first subblock (L1-P0) having the block size of 32×32 is split into4 subblocks having the block size of 8×8, a partition type 3 is encoded.Since 4 subblocks (L3-P0, L3-P1, L3-P2, and L3-P3) having the block sizeof 8×8 within the subblock (L2-P0) having the block size of 16×16 arenot split into smaller subblocks any more, partition type indicatinginformation {3, 3, 0, 0} is encoded, respectively. Since subblocks inthe layer 3 cannot be split into smaller subblocks, partition typeindicating information on the subblocks included in the layer 3 is notencoded.

Since partition type indicating information on subblocks included in thelayer 3 has been fully encoded, partition type indicating information ona second subblock (L2-P1) having the block size of 16×16 and a thirdsubblock (L2-P2) having the block size of 16×16 in the layer 2 encoded.However, in this event, they all are not split into smaller subblocksany more, so that partition type indicating information 0 is encoded.Since partition type indicating information is not 3 although a fourthsubblock (L2-P3) having the block size of 16×16 is split into subblockshaving the block size of 16×8, only partition type indicatinginformation 1 is encoded. Since partition type indicating information on4 subblocks included in the layer 2 has been fully encoded, partitiontype indicating information on a second subblock (L1-P1) having theblock size of 32×32 in the layer 1 is encoded. In this event, since thesecond subblock (L1-P1) having the block size of 32×32 in the layer 1 issplit into subblocks having the block size of 16×32 and the respectivesplit subblocks are not split into smaller subblocks any more, partitiontype indicating information 2 is encoded. In the same way, partitiontype indicating information on a second subblock (L1-P2) having theblock size of 32×32 and a fourth subblock (L1-P3) having the block sizeof 32×32 in the layer 1, and 4 lower subblocks (L2-P0, L2-P1, L2-P2, andL3-P3) having the block size of 16×16 are sequentially encoded, and thus{1, 3, 0, 0, 0, 0} is encoded.

If information on partition types of the macroblock shown in FIG. 11 isencoded according to such an encoding method, partition type indicatinginformation {3, 3, 3, 3, 3, 0, 0, 0, 0, 1, 2, 1, 3, 0, 0, 0, 0} isencoded as shown in FIG. 13.

Further, it is possible to encode the partition type indicatinginformation according to the following order.

Partition type indicating information {3} of the layer 0 is encoded,partition type indicating information {3, 2, 1, 3} on 4 subblocks(L1-P0, L1-P1, L1-P2, and L1-P3) of the layer 1 is encoded, partitiontype indicating information {3, 0, 0, 1, 0, 0, 0, 0} on 8 subblocks (4subblocks included in L1-P0 and 4 subblocks included in L1-P3) of thelayer 2 is encoded, and partition type indicating information {3, 3, 0,0} on 4 subblocks (4 subblocks included in L2-P0 within L1-P0) of thelayer 3 is encoded. In this event, partition type indicating information{3, 3, 2, 1, 3, 3, 0, 0, 1, 0, 0, 0, 0, 3, 3, 0, 0} is encoded.

In this event, the partition type indicating information may be encodedinto a binary bit string by using a lossless compression coding such asa binary arithmetic coding, a Huffman coding, etc.

For example, in a case of using the binary arithmetic coding, each ofthe partition type indicating information can use different binaryvalues depending on layer numbers of partition type indicatinginformation to be currently encoded. The partition type indicatinginformation can be encoded by using Table 1 if the layer number is equalto or smaller than

${\log_{2}\left( \frac{N}{16} \right)},$and the partition type indicating information can be encoded by usingTable 2 if the layer number is larger than

${\log_{2}\left( \frac{N}{16} \right)}.$For example, since partition type indicating information 3 of thesubblock (L1-P0) of FIG. 11 can be expressed by the binary number “01”with reference to Table 1, the partition type indicating information 3can be encoded by performing an arithmetic encoding on the binarynumbers “0” and “1”. Further, since partition type indicatinginformation 0 of the subblock (L3-P2) included in the subblock (L2-P0)can be expressed by the binary number “1”, the partition type indicatinginformation 3 can be encoded by performing an arithmetic encoding on thebinary number “1”.

TABLE 1 Partition Type Indicating Information Binary String    0 0 0 1 11 2 1 0 3 0 1

TABLE 2 Partition Type Indicating Information Binary String 0 1 1 0 0 20 1 1 3 0 1 0

In addition, an actual partition type indicating information value canbe encoded using various binary coding methods such as a unary code, atruncated unary code, Exp-Golomb code, etc.

Furthermore, when a macroblock is split by using partition types shownin FIG. 34 according to another aspect of the present disclosure,partition type indicating information may be a flag having a 1 bitlength indicating whether a current block is split into 4 subblocks.

B-1-4-2) Partition Information Encoding Method 2

As another aspect of encoding block partition information by using apartition type for each macroblock layer, the partition informationencoder 810 can encode block partition information by using a treestructure. That is, the partition information encoder 810 first encodesa layer number by using the tree structure and then encodes blockpartition information by encoding partition type indicating information.

Hereinafter, a second method of encoding block partition informationusing a tree structure will be described with reference to FIGS. 14 to18.

FIGS. 14A and 14B are exemplary diagrams for illustrating a method ofencoding block partition information by using a tree structure accordingto another aspect of the present disclosure.

FIG. 14A shows layer numbers of respective subblocks of the macroblockfor each level, and FIG. 14B shows layer numbers of respective subblocksfor each level in a tree structure.

In FIG. 14A, a macroblock size is N×N and the macroblock is split intosubblocks by partition types shown in FIG. 10. FIG. 14A illustrates acase where the macroblock is split into subblocks having a block size ofN×(N/2) as an example. The macroblock having the block size of N×N issplit into 2 subblocks having the block size of N×(N/2), and partitiontype indicating information is 1. Here, since each N×(N/2) subblock isincluded in a layer 0, a minimum value of the layer number of the 2subblocks in a tree level 1 is 0. Accordingly, a layer number of a treelevel 0 becomes 0. Meanwhile, numbers indicated in “ ” such as “01”,“1”, and “001” represent binary bits in FIGS. 14 to 18.

FIG. 14B illustrates layer numbers of respective subblocks for eachlevel shown in FIG. 14A in a tree structure type.

After the number of “0 (1 bit)” corresponding to a difference valuebetween a layer number of a higher node and a layer number of a currentnode, which is desired to be encoded, is encoded, “1” is lastly encoded.For example, when the difference value between the layer number of thehigher node and the layer number of the current node is 3, a binarynumber “0001” is encoded. When the difference value is 0, a binarynumber “1” is encoded. Since there is no higher node of a level 0, it isassumed that a layer number of the higher node is 0. Accordingly, adifference value between the layer number 0 of the level 0 and theassumed layer number 0 of the higher node is 0, so that a binary bit ofthe layer number 0 of the level 0 becomes “1”.

Since the layer number of the level 1 and the layer number of the level0 are equal to each other, the layer number may not be encoded any moreand partition type indicating information 1 of the level 1 is encoded.

The partition type indicating information can be encoded into the binarybit string by using a lossless compression coding such as a binaryarithmetic coding, a Huffman coding, etc. as described above.

Further, the partition type indicating information can be encoded byusing various binary coding methods such as a unary code, a truncatedunary code, an Exp-Golomb code, etc.

In addition, different binary values can be used depending on layernumbers.

Furthermore, when the macroblock is split by using partition typesaccording to another aspect of the present disclosure shown in FIG. 34,partition type indicating information may be a flag having a 1 bitlength indicating whether the current block is split into 4 subblocks.

The partition type indicating information 1 according to the aboveaspect can represent the partition type indicating information valuewith the binary bit as described above. For example, since partitiontype indicating values “0”, “1”, “2”, and “3” correspond to 4 types,they can be represented by “00”, “01”, “10”, and “11” by allocating 2bits. In this event, the partition type indicating information 1 can berepresented by “01”.

Accordingly, when macroblock partition information shown in FIG. 14A isfinally encoded by using the tree structure, data to be encoded becomes“101”.

FIGS. 15 and 16 are exemplary diagrams for illustrating an example of amethod of encoding block partition information by using the treestructure according to another aspect of the present disclosure.

FIG. 15 shows an example of a process of determining a layer number ofeach subblock for each level in order to encode block partitioninformation by using the tree structure when a macroblock having a blocksize of N×N is split into 2 subblocks having a block size of(N/2)×(N/4), 1 subblock having a block size of (N/2)×(N/2), 2 subblockshaving a blocks size of (N/4)×(N/2), and 4 subblocks having a block sizeof (N/4)×(N/4).

First, a level 2 is constructed by the macroblock having the block sizeof N×N, and a level 1 is constructed together by a minimum value of alayer number of the 2 subblocks included in a first subblock having theblock size of (N/2)×(N/2) within a macroblock of the level 2, a minimumvalue of a layer number of the 1 subblock included in a second subblockhaving the block size of (N/2)×(N/2) within the macroblock of the level2, a minimum value of a layer number of the 2 subblocks included in athird subblock having the block size of (N/2)×(N/2) within themacroblock of the level 2, and a minimum value of a layer number of the4 subblocks included in a fourth subblock having the block size of(N/2)×(N/2) within the macroblock of the level 2.

FIG. 16 shows a process of constructing the tree structure according tothe layer number for each level constructed in FIG. 15 and encoding thelayer number and a partition type.

A layer number of the level 0 to be encoded is 1 and there is no highernode of the level 0. Since a difference value between a layer number ofa higher node and the layer number of the level 0 is 1 based on anassumption that the layer number of the higher node is “0”, a binary bitof the layer number of the level 0 becomes “01”. Since layer numbers ofthe level 1 to be encoded are 1, 1, 1, 1, respectively and the layernumber of the higher node (level 0) is 1, a difference value between thelayer numbers is 1 and thus binary bits of respective layer numbers are“1”, “1”, “1”, and “1”. Since layer numbers of the level 2 to be encodedare all included in the level 1, the layer numbers do not have to beencoded any more. Accordingly, partition type indicating information 1,0, 2, and 3 are encoded. Since the partition type indicating informationis binary arithmetic-encoded or Huffman-encoded by using differenttables depending on the layer number as described above, binary bits ofthe partition type indicating information 1, 0, 2, and 3 can become, forexample, “00”, “11”, “10”, and “01”. Therefore, a layer number andpartition type indicating information to be finally encoded become“01”→“1”→“1”→“1”→“1”→“00”→“11”→“10”→“01”. As a result, “01111100111001”is encoded and becomes encoded partition information data.

FIGS. 17 and 18 are exemplary diagrams for illustrating another exampleof the method of encoding the block partition information by using thetree structure according to another aspect of the present disclosure.

FIG. 17 shows an example of a case where a macroblock having a blocksize of N×N is split into 2 subblocks having a block size of(N/2)×(N/4), 1 subblock having a block size of (N/2)×(N/2), 2 subblockshaving a blocks size of (N/4)×(N/2), 2 subblocks having a block size of(N/32)×(N/16), 4 subblocks having a block size of (N/32)×(N/32), 6subblocks having a block size of (N/16)×(N/16), and 2 subblocks having ablock size of (N/4)×(N/4). A fourth subblock having the block size of(N/2)×(N/2) of the macroblock is split into 4 subblocks having the blocksize of (N/4)×(N/4), and a first subblock and a second subblock havingthe block size of (N/4)×(N/4) among the 4 subblocks having the blocksize of (N/4)×(N/4) are split into 4 subblocks having the block size of(N/16)×(N/16), respectively. Here, since a first subblock and a secondsubblock having the block size of (N/16)×(N/16) among the subblockshaving the block size of (N/16)×(N/16) split from the first subblockhaving the block size of (N/4)×(N/4) are split into smaller blocks,layer numbers 2 and 3 are allocated as shown in FIG. 17.

FIG. 18 can be created if the macroblock shown in FIG. 17 is constructedaccording to a layer number for each level in a tree structure type inthe same way described in FIG. 15.

FIG. 18 shows a process of constructing the tree structure according tothe layer number for each level constructed in FIG. 17 and encodinglayer numbers and partition types.

If layer numbers and partition type indicating information are encodedin the same way described in FIG. 16, data to be finally encoded becomes“01111010111100111010011111011111”.

B-1-4-3) Partition Information Encoding Method 3

Hereinafter, a third method of encoding block partition information willbe described with reference to FIGS. 19 and 20.

According to the third method, the partition information encoder 810 canencode block partition information by using a partition layer value anda partition flag. That is, the partition information encoder 810 splitsthe macroblock by using only subblocks having a square shape such asN×N, (N/2)×(N/2), and (N/4)×(N/4) when a block type of a block, whichencodes partition information, is an intra block type, and can encodethe block partition information by encoding partition layer values ofrespective subblocks and the partition flags. Hereinafter, a method ofencoding block partition information by using the partition layer valueand the partition flag is described with reference to FIGS. 19 and 20.

FIG. 19 is an exemplary diagram for illustrating subblocks split basedon partition layer values according to another aspect of the presentdisclosure.

When a macroblock having a block size of N×N (N is an integer equal toor larger than 16) is split according to partition layer values 0, 1,and 2, sizes and shapes of subblocks can be determined as shown in FIG.19. When the macroblock having the block size of N×N is split accordingto the partition layer value 0, the macroblock is split into only 1subblock having the block size of N×N. When the macrobock is splitaccording to the partition layer value 1, the macroblock is split into 4subblocks having a block size of (N/2)×(N/2). When the macroblock issplit according to the partition layer value 2, the macroblock is splitinto 8 subblock having a block size of (N/4)×(N/4).

Accordingly, when it is assumed that a partition layer value of anyblock is x, a block size of a subblock of the corresponding block canbecome

$\frac{N}{2^{x}} \times {\frac{N}{2^{x}}.}$For example, when a partition layer value is 3, a macroblock having ablock size of 64×64 is split into subblocks having a block size of 8×8.Further, when a partition layer value of the subblock having the blocksize of 8×8 is 1, the subblock having the block size of 8×8 is splitinto subblocks having a block size of 4×4.

A partition flag is a flag indicating that, when a N×N block is splitinto

$\frac{N}{2^{x}} \times \frac{N}{2^{x}}$subblocks, one or more

$\frac{N}{2^{x}} \times \frac{N}{2^{x}}$subblocks are split into smaller subblocks.

For example, when the N×N block is split into

$\frac{N}{2^{x}} \times \frac{N}{2^{x}}$subblocks and all

$\frac{N}{2^{x}} \times \frac{N}{2^{x}}$subblocks within the N×N block are not split into smaller subblocks, thepartition flag has a value (e.g. 0) indicating that all

$\frac{N}{2^{x}} \times \frac{N}{2^{x}}$subblocks with the N×N block are not split into smaller subblocks.

When the N×N block is split into

$\frac{N}{2^{x}} \times \frac{N}{2^{x}}$subblocks and one or more

$\frac{N}{2^{x}} \times \frac{N}{2^{x}}$subblocks within the N×N block are split into smaller subblocks, thepartition flag has a value (e.g. 1) indicating that all

$\frac{N}{2^{x}} \times \frac{N}{2^{x}}$subblocks within the N×N block are split into smaller subblocks.

When the partition flag has the value indicating that a subblock issplit into smaller subblocks, partition layer values and partition flagsfor all

$\frac{N}{2^{x}} \times \frac{N}{2^{x}}$subblocks within the N×N block are encoded and subblock types ofrespective

$\frac{N}{2^{x}} \times \frac{N}{2^{x}}$subblocks are transmitted to the video decoding apparatus.

However, when a subblock size split according to a partition layer valuecorresponds to a minimum block size (that is, the subblock cannot besplit into smaller subblocks), the partition flag is not encoded.

The aforementioned partition layer value and partition flag are includedin the bitstream, and encoded and transmitted to the video decodingapparatus. In a method of encoding the partition layer value, amacroblock size to be transmitted can be encoded by using various binarycoding methods such as a unary code, a truncated unary code, anExp-Golomb code, etc.

Alternatively, the macroblock size can be encoded by using a binaryarithmetic coding, a Huffman coding, etc.

Alternatively, an index value of a prearranged table between the videoencoding and the video decoding apparatus can be encoded by using theaforementioned various binary coding methods.

The partition flag can be included in the bitstream by using 1 bitindicating whether a block is split or not.

FIG. 20 is an exemplary diagram for illustrating a process of encodingblock partition information by using a partition layer value and apartition flag according to another aspect of the present disclosure.

FIG. 20 shows an example of encoding block partition information byusing the partition layer value and the partition flag when a block sizeof a macroblock is 64×64 and a maximum partition layer value is 4.

When the macroblock is split as shown in FIG. 20, partition layer valuesand partition flags of respective subblocks are generated in everypartition number for each layer for identifying the respective subblocksas shown in a table of FIG. 20, and partition layer values and partitionflags are sequentially encoded from an L0-P0 subblock to an L1-P3subblock. Since the L0-P0 subblock having a block size of 64×64 is splitinto 4 subblocks having a block size of 32×32, a partition layer valueis 1. A partition flag value of each 32×32 subblock is set to a valueindicating that the subblock is split into smaller subblocks, and apartition layer value and a partition flag are encoded.

Since the L1-P0 subblock having the block size of 32×32 is not splitinto smaller subblocks, a partition layer value is 0 and a partitionflag does not need to be encoded. Since an L1-P1 subblock having theblock size of 32×32 is split into subblocks having a block size of 8×8,a partition layer value is 2. Since the subblocks having the block sizeof 8×8 are not split any more, a partition flag is encoded into 0indicating that the subblock is not split. In this event, sizes andshapes of subblocks L2-P0 to L2-P15, which are lower subblocks of theL1-P1 subblock, can be identified in the video decoding apparatus byencoding only partition layer values and partition flags of thesubblocks L2-P0 to L2-P15 without separately encoding partition types ofthe subblocks L2-P0 to L2-P15. Since an L1-P2 subblock having the blocksize of 32×32 is split into 4 subblocks having a block size of 16×16, apartition layer value is 1 and a partition flag is encoded into 1indicating that the subblock is split into smaller subblocks. Since ithas been indicated that the L1-P2 subblock is split into smallersubblocks by indicating the partition flag of the L1-P2 subblock as 1,partition types of respective split subblocks of L2-P0 to L2-P3 areencoded. Accordingly, partition layer values of the L2-P0, L2-P1, andL2-P2 subblocks are 0, and thus partition flags do not need to beencoded due to the partition layer values of 0. Since the L2-P3 subblockis split into subblocks having a block size of 4×4 and the splitsubblocks are not split into smaller subblocks, a partition layer 2 anda partition flag 0 indicating that the subblock is not split should beencoded. However, a maximum partition layer value and a sum of totallayer values of the L1-P1 and L2-P3 subblocks are equal to each other,wherein the maximum partition layer value is 4 and each of the partitionlayer values of the L1-P1 and L2-P3 subblocks is 2. Accordingly, it canbe derived that the subblock cannot be split any more, which means thatthe partition flag does not need to be encoded. Lastly, since an L1-P3subblock having the block size of 32×32 is split into 64 subblockshaving a block size of 4×4, a partition layer value is 3 and itspartition layer value is equal to the maximum partition layer value likethe L2-P3 subblock. Accordingly, it can be derived that the subblockcannot be split any more, which means that the partition flag does notneed to be encoded.

In the above described way, block partition information can be encodedby encoding the partition layer value and the partition flag for thepartition number for each layer for identifying respective subblocks ofthe macroblock.

Meanwhile, the method of encoding block partition information bysequentially encoding the partition type indicating information for eachlayer of the macroblock according to the subblock order and generatingencoded partition information data has been described through FIGS. 11to 13, but it is not necessary to split the macroblock into subblocks asshown in FIGS. 11 to 13 and the block partition information can beencoded by sequentially encoding the partition type indicatinginformation for each layer of the macroblock according to the subblockorder even when the macroblock is split as shown in FIG. 21.

B-1-4-4) Partition Information Encoding Method 4

Hereinafter, a fourth method of encoding block partition information isdescribed with reference to FIGS. 21 and 22.

FIG. 21 is an exemplary diagram for illustrating another example of amacroblock split into subblocks having various block sizes according toanother aspect of the present disclosure.

Meanwhile, it has been described that subblocks of the layer K+1 areavailable only when the subblock of the layer K (0≦K≦log₂(N/4)) is splitinto 4 subblocks in the layer K in FIG. 9, but subblocks of the layerK+1 are available when the subblock of the layer K is split into one ormore subblocks in the layer K in FIG. 21 (that is, when partition typeindicating information is 1, 2, or 3).

FIG. 21 shows an example in which a macroblock having a block size of64×64 is split into 2 subblocks having a block size of 64×16 and 2subblocks having a block size of 32×32. Numbers written in “□” representan order of encoding partition type indicating information of respectivesubblocks. If partition type indicating information of respective layersof the macroblock is sequentially encoded according to the subblockorder, the partition type indicating information for respective layerscan be encoded according to the order shown in FIG. 11.

FIG. 22 is another exemplary diagram for illustrating a process ofsequentially encoding partition type indicating information forrespective layers of the macroblock according to the subblock order.

A table shown in FIG. 22 is generated if partition type information ofrespective subblocks of the macroblock shown in FIG. 21 is encoded. Ifpartition type indicating information of respective layers of themacroblock is sequentially encoded according to the subblock order, thepartition type indicating information for respective layers can beencoded according to the order shown in FIG. 11.

In this event, the partition type indicating information can be encodedinto the binary bit string by using a lossless compression coding suchas a binary arithmetic coding, a Huffman coding, etc.

Alternatively, an actual partition type indicating information value canbe encoded using various binary coding methods such as a unary code, atruncated unary code, Exp-Golomb code, etc.

Further, when the macroblock is split by using partition types accordingto another aspect of the present disclosure shown in FIG. 34, thepartition type indicating information may be a flag having a 1 bitlength indicating that the current block is split into 4 subblocks ornot.

B-1-5) Description of Encoding Flowchart

FIG. 23 is a flowchart for illustrating a video encoding methodaccording to another aspect of the present disclosure.

According to the video encoding method according to another aspect ofthe present disclosure, the video encoding apparatus 800 generatesencoded image data by performing a predictive-encoding on a currentblock split into a plurality of subblocks in step S2310, generatesencoded partition information data by encoding partition information ofthe current block in step S2320, and generates a bitstream including theencoded image data and the encoded partition information data in step S2330.

Here, the current block may be a macroblock having a size larger than ablock size of 16×16, and the partition information may contain blocksizes and arrangements of a plurality of subblocks within the currentblock.

A plurality of subblocks can be identified by partition type indicatinginformation for each partition layer. In this event, the video encodingapparatus 800 can encode partition information of the current block bysequentially encoding the partition type indicating information for eachpartition layer according to a partition type indicating informationencoding order or encode the partition information of the current blockby encoding layer numbers and the partition type indicating informationby using a tree structure in step S2320.

Further, the video encoding apparatus 800 can encode the partitioninformation of the current block by using partition layer values andpartition flags. More specifically, the video encoding apparatus 800 canencode the partition information of the current block by using partitionlayer values and partition flags only when a block type of the currentblock is an intra block type. Since the method of encoding the partitioninformation of the current block by the video encoding apparatus 800 hasbeen described through FIGS. 8 to 22, its detailed description will beomitted here.

B-2) Video Decoding Apparatus of Embodiment 2

B-2-1) Block Diagram and Description of Decoding Apparatus

FIG. 24 is a schematic block diagram for illustrating a video decodingapparatus according to another aspect of the present disclosure.

The video decoding apparatus 2400 according to another aspect of thepresent disclosure may include a partition information decoder 2410 anda video decoder 2420.

The partition information decoder 2410 extracts and decodes encodedpartition information data from the bitstream, and reconstructspartition information of the current block. Here, the partitioninformation of the current block may be partition type indicatinginformation for each partition layer, layer numbers and partition typeindicating information using a tree structure, or partition layer valuesand partition flags. When the partition information of the current blockis the partition type indicating information according to a partitiontype indicating information encoding order, the partition informationdecoder 2410 can obtain partition type indicating information for eachlayer shown in FIG. 13 by decoding encoded partition information data,and can obtain a current block split into a plurality of subblocks shownin FIG. 11 by splitting the current block into the plurality ofsubblocks according to partition type indicating information for eachlayer based on the partition type indicating information and theencoding order shown in the table of FIG. 3.

When the partition information of the current block corresponds to layernumbers and partition type indicating information using the treestructure, the partition information decoder 2410 can obtain layernumbers and partition type indicating information expressed in the treestructure as shown in FIG. 16 by decoding encoded partition informationdata, and can obtain a current block split into a plurality of subblocksshown in FIG. 15 by inversely performing the method described in FIGS.15 and 16 by using the layer numbers and the partition type indicatinginformation expressed in the tree structure as shown in FIG. 16.

When the partition information of the current block corresponds topartition layer values and partition flags, the partition informationdecoder 2410 can obtain partition layer values and partition flags shownin FIG. 20 by decoding encoded partition information data, and canobtain a current block split into a plurality of subblocks shown in FIG.20 by inversely performing the method described in FIG. 20.

The video decoder 2420 may be equally or similarly constructed to thevideo decoding apparatus according to an aspect of the presentdisclosure described with reference to FIG. 7. However, the videodecoder 2420 according to another aspect of the present disclosureextracts and decodes encoded image data of subblocks split according topartition information of the current block reconstructed by thepartition information decoder 2410, and then reconstructs respectivesubblocks through a predictive encoding. In this event, image dataextracted from the bitstream by the video decoder 2420 may be predicteddata and/or data required for a residual signal decoding such as atransform type, CBP, and a transform coefficient. Here, the predicteddata corresponds to data indicating whether each subblock is an intrablock or an inter block, and corresponds to an intra prediction mode forthe intra block and motion information for the inter block.

B-2-2) Partition information Decoding Method

Hereinafter, various methods of decoding partition information, which isinformation indicating sizes and shapes of subblocks used for theprediction or the transform within the macroblock, according to aspectsof the present invention will be described.

B-2-2-1) Partition Information Decoding Method 1

A decoding method according to the first method of encoding thepartition information is first described.

Partition type indicating information is decoded by using a prearrangedsubblock type available for each layer between the video encodingapparatus and the video decoding apparatus according to a prearrangedorder between the video encoding apparatus and the video decodingapparatus. For example, available subblock types for respective layersmay be subblock types shown in FIGS. 10 and 34, and the partition typeindicating information can be sequentially decoded according to theorders shown in FIGS. 11 and 13.

Hereinafter, a decoding method under the same conditions as the examplesused for describing the first method of encoding the partitioninformation is described. The partition information is decoded based onsubblock types shown in FIG. 10 according to the order shown in FIG. 11.

The partition information decoder 2410 extracts and decodes firstpartition type indicating information from the bitstream, andreconstructs partition type indicating information of a macroblock layer0. When a reconstructed partition type indicating information value is0, it means that the macroblock is not split into subblocks, so that apartition type indicating information decoding of the current macroblockis terminated. Thereafter, the prediction or the transform is performedby unit of N×N macroblocks.

When the reconstructed partition type indicating information value ofthe layer 0 is 1, the macroblock is split into 2 subblocks of size

$N \times \frac{N}{2}$and a partition type indicating decoding of the current macroblock isterminated. Thereafter, the prediction or the transform is performed byunit of

$N \times \frac{N}{2}$macroblocks.

When the reconstructed partition type indicating information value ofthe layer 0 is 2, the macroblock is split into 2 subblocks of size

$\frac{N}{2} \times N$and a partition type indicating decoding of the current macroblock isterminated. Thereafter, the prediction or the inverse transform isperformed by unit of

$\frac{N}{2} \times N$macroblocks.

When the reconstructed partition type indicating information value ofthe layer 0 is 3, the macroblock is split into 4 subblocks of size

$\frac{N}{2} \times \frac{N}{2}$and partition type indicating information of a first subblock (having apartition number 0 of a layer 1) is decoded. Here, a layer number of the

$\frac{N}{2} \times \frac{N}{2}$subblocks is 1, which is a value increased from a higher layer number.

When partition type indicating information of the subblock having thepartition number 0 of the layer 1 extracted and decoded from thebitstream is not 3, partition type indicating information of a secondsubblock of size

$\frac{N}{2} \times \frac{N}{2}$(having a partition 1 of the layer 1) is encoded.

When the partition type indicating information of the subblock havingthe partition number 0 of the layer 1 extracted and decoded from thebitstream is 3, the current subblock is split into 4 subblocks and thelayer number is 2. Thereafter, partition type indicating information ofa subblock corresponding to a partition number 0 of a layer 1 isextracted and decoded from the bitstream.

In a case where a layer number K of the current subblock having apartition number Y corresponds to a maximum value which can be allocatedto layer numbers, if decoded partition type indicating information ofthe current subblock (having the partition number Y of the layer numberK) is 3, the current subblock is split into 4 subblocks and thenpartition type indicating information of a subsequent subblock (having apartition number Y+1 of the layer number K) is decoded in a raster scanorder.

When the partition number of the current subblock corresponds to amaximum value of partition numbers included in the current layer,partition type indicating information of subblocks of a higher layer,which have not been decoded yet, is decoded.

Hereinafter, the decoding method according to the aspect of FIG. 11 isdescribed based on a case where a macroblock size is 64×64 and thenumber of maximum partition layers is 4. In the aspect of FIG. 11, avalue encoded with partition type indicating information in the videoencoding apparatus is {3, 3, 3, 3, 3, 0, 0, 0, 0, 1, 2, 1, 3, 0, 0, 0,0}.

First, partition type indicating information of a layer 0 is decoded.

Since the decoded partition type indicating information is 3, the 64×64macroblock is split into 4 subblocks of size 32×32 (L1-P0, L1-P1, L1-P2,and L1-P3).

Since each 32×32 subblock can be split into smaller subblocks, partitiontype indicating information of a first 32×32 subblock (L1-P0) within the64×64 macroblock is decoded.

Since secondly decoded partition type indicating information is 3, theL1-P0 subblock is split into 4 subblocks of size 16×16 (L2-P0, L2-P1,L2-P2, and L2-P3) and partition type indicating information of the L2-P0subblock is extracted and decoded from the bitstream.

Since thirdly decoded partition type indicating information is 3, theL2-P0 subblock of size 16×16 is split into 4 subblocks of size 8×8(L3-P0, L3-P1, L3-P2, and L3-P3) and partition type indicatinginformation of the L3-P0 subblock is extracted and decoded from thebitstream.

Since fourthly decoded partition type indicating information is 3, theL3-P0 subblock of size 8×8 is split into 4 subblocks of size 4×4. Here,since the number of maximum partition layers is 4, the subblock cannotbe split into smaller subblocks and thus partition type indicatinginformation of the L3-P1 subblock is extracted and decoded from thebitstream.

Since fifthly decoded partition type indicating information is 3, theL3-P1 subblock of size 8×8 is split into 4 subblocks of size 4×4 andpartition type indicating information of the L3-P2 subblock is extractedand decoded from the bitstream.

Since sixthly decoded partition type indicating information is 0, theL3-P2 subblock of size 8×8 is not split any more and partition typeindicating information of the L3-P2 subblock, which is the sequentsubblock, is extracted and decoded from the bitstream.

Since seventhly decoded partition type indicating information is 0, theL3-P3 subblock of size 8×8 is also not split. Here, since a partitionnumber of the current subblock corresponds to a maximum value ofpartition numbers included in the current layer, partition typeindicating information of subblock L2-P1 of a higher layer is extractedand decoded from the bitstream.

Since eighthly decoded partition type indicating information is 0, ablock size of the subblock L2-P1 is 16×16.

In the same way, partition type indicating information of the subblocksL2-P2 and L2-P3 is extracted and decoded from the bitstream, andrespective subblock types are determined.

Since ninthly decoded partition type indicating information is also 0, ablock size of the subblock L2-P2 is 16×16. Since tenthly decodedpartition type indicating information is 1, the L2-P3 subblock is splitinto 2 subblocks of size 16×8.

Since all partition type indicating information of subblocks included inthe layer 2 have been decoded, partition type indicating information ofa second subblock L1-P1 of size 32×32 of the layer 1, which is a higherlayer, is decoded.

Since eleventhly decoded partition type indicating information is 2, the32×32 block corresponding to the L1-P1 subblock is split into 2subblocks of size 16×32 and partition type indicating information of thesubblock L1-P2 is decoded.

Since twelfthly decoded partition type indicating information is 1, the32×32 block corresponding to the L1-P2 subblock is split into 2subblocks of size 32×16 and partition type indicating information of thesubblock L1-P3 is decoded.

Since thirteenthly decoded partition type indicating information is 3,the 32×32 block corresponding to the L1-P3 subblock is split into 4subblocks of size 16×16 (L2-P0, L2-P1, L2-P3, and L2-P3) and partitiontype indicating information of respective subblocks are decoded in thesame way.

Since fourteenthly decoded partition type indicating information is 0, asubblock type of the L2-P0 subblock is 16×16 and partition typeindicating information of the L2-P1 subblock, which is a subsequentsubblock, is decoded because the L2-P0 subblock is not split any more.

Since fifteenthly decoded partition type indicating information is 0, asubblock type of the L2-P1 subblock is 16×16 and partition typeindicating information of the L2-P2 subblock, which is a subsequentsubblock, is decoded because the L2-P1 subblock is not split any more.

Since sixteenthly decoded partition type indicating information is 0, asubblock type of the L2-P2 subblock is 16×16 and partition typeindicating information of the L2-P3 subblock, which is a subsequentsubblock, is decoded because the L2-P2 subblock is not split any more.

Since seventeenthly decoded partition type indicating information is 0,a subblock type of the L2-P3 subblock is 16×16 and a partition typeindicating information decoding for a current macroblock decoding isterminated because subblock types of all subblocks within the macroblockhave been determined.

Hereinafter, a method of decoding partition type indicating informationwhen all partition type indicating information of higher layers isencoded and then partition type indicating information of lower layersis encoded according to the partition type indicating informationencoding order will be described.

In the aspect of FIG. 11, a value encoded with partition type indicatinginformation in the video encoding apparatus is {3, 3, 2, 1, 3, 3, 0, 0,1, 0, 0, 0, 0, 3, 3, 0, 0}.

First, partition type indicating information of a layer 0 is decoded.

Since the decoded partition type indicating information is 3, the 64×64macroblock is split into 4 subblocks of size 32×32 (L1-P0, L1-P1, L1-P2,and L1-P3).

Since the number of subblocks included in a layer 1 is 4, 4 partitiontype indicating information pieces are decoded. Since partition typeindicating information of subblocks (L1-P0, L1-P1, L1-P2, and L1-P3)reconstructed from the bitstream are {3, 2, 1, 3}, the L1-P0 and L1-P3subblocks are split into 4 subblocks of size 16×16, the L1-P1 subblockis split into 2 subblocks of size 16×32, and the L1-P2 subblock is splitinto 2 subblocks of size 32×16.

Partition type indicating information of 8 subblocks of size 8×8 of alayer 2 included in the L1-P0 and L1-P3 subblocks is extracted anddecoded from the bitstream.

Since partition type indicating information of 4 subblocks (L2-P0,L2-P1, L2-P2, and L2-P3) included in the reconstructed L1-P0 is {3, 0,0, 1} and partition type indicating information of 4 subblocks (L2-P0,L2-P1, L2-P2, and L2-P3) included in the reconstructed L1-P3 is {0, 0,0, 0}, the L2-P0 subblock included in the L1-P0 subblock is split into 4subblocks of size 4×4 and the L2-P3 subblock is split into 2 subblocksof size 8×4.

Since partition type indicating information of the L2-P1 and L2-P2subblocks included in the L1-P0 subblock and 4 subblocks included in theL1-P3 subblock is all 0, the subblocks are not split.

Since the L2-P0 subblock included in the L1-P0 subblock is split into 4subblocks and they cannot split into smaller subblocks any more, apartition type indicating information decoding for a current macroblockdecoding is terminated.

In this event, the partition type indicating information isentropy-decoded by using a prearranged method between the video encodingapparatus and the video decoding apparatus among lossless compressionencoding/decoding methods such as a binary arithmetic coding, a Huffmancoding, etc.

Further, an actual partition type indicating information value can bedecoded by using various binary coding methods such as a unary code, atruncated unary code, an Exp-Golomb code, etc.

In addition, the video decoding apparatus performs an entropy decodingby using Tables 1 and 2 according to layer numbers of partition typeindicating information when the video encoding apparatus uses a binaryarithmetic coding, uses Table 1 in a case where a layer number is equalto or smaller than

${\log_{2}\left( \frac{N}{16} \right)},$and uses Table 2 in a case where the layer number is larger than

${\log_{2}\left( \frac{N}{16} \right)},$as the partition type indicating information encoding method.

For example, when partition type indicating information included in alayer 1 is entropy-decoded for a 64×64 macroblock, 2 bits areentropy-decoded and then partition type indicating information isobtained using Table 1.

When partition type indicating information included in a layer 3 isentropy-decoded for the 64×64 macroblock, Table 2 is used. First, 1 bitis entropy-decoded. Then, when a decoded binary bit is 1, partition typeindicating information is set to 0 and a partition type indicatinginformation entropy decoding of the current subblock is terminated. Whenthe decoded binary bit is not 1, 1 bit is further entropy-decoded fromthe bitstream. When a secondly decoded bit is 0, partition typeindicating information of the current subblock is set to 1 and anentropy decoding for partition type indicating information of thecurrent subblock is terminated. When the secondly decoded bit is 1, 1bit is further entropy-decoded from the bitstream and it is determinedwhether partition type indicating information of the current subblock is2 or 3 by using Table 2.

Further, when it is prearranged between the video encoding apparatus andthe video decoding apparatus that partition types according to anotheraspect of the present disclosure shown in FIG. 34 are used, it can bedetermined whether the current subblock is split into 4 subblocks byentropy-decoding 1 bit for the partition type indicating informationdecoding.

B-2-2-2) Partition Information Decoding Method 2

Hereinafter, a decoding method according to the second method ofencoding the partition information is described.

According to the second method, block partition information can bedecoded by first decoding layer numbers by using the tree structure andthen decoding partition type indicating information.

In a method of decoding layer numbers, a difference value between alayer number of a current level and a layer number of a higher level isreconstructed by decoding binary bits 0 and 1. In this event, 1 bit isread and decoded from the bitstream in order to reconstruct thedifference value. When a decoded binary bit is 0, 1 bit is further readand decoded from the bitstream. In the same way, the binary bit 0 iscontinuously reconstructed until the binary bit 1 is reconstructed. Whenthe reconstructed binary bit is 1, no bits are further read and decoded,and the difference value becomes the number of reconstructed 0.

A decoding of the layer number of the level 0 is started and adifference value between the layer number of the level 0 and a number 0is reconstructed from the bitstream by using the aforementioned methodfor a layer number reconstruction. When the reconstructed layer numberof the level 0 is larger than a number 0, a tree is constructed bygenerating child nodes in the current node. The number of newlygenerated child nodes is different depending on a prearranged subblocksplitting method between the video encoding apparatus and the videodecoding apparatus. According to a subblock splitting method shown inFIG. 9, since subblocks included in a lower layer can be used only whenthe current subblock is split into 4 subblocks, 4 child nodes aregenerated. The newly generated nodes have level values increased fromlevel values of higher layers by 1.

That is, when the reconstructed layer number of the level 0 is largerthan a level value 0, the tree structure is constructed by generating 4child nodes included in a level 1.

Next, 4 difference values for reconstructing layer numbers of the newlygenerated nodes are extracted and reconstructed from the bitstream, andlayer numbers of respective nodes are reconstructed by adding thedifference values and layer numbers of higher nodes.

In the same way, when the reconstructed layer number of each node and alevel value of the node are equal to each other, a child node includedin a lower level is not constructed for a corresponding node. When thereconstructed layer number of each node is larger than the level valueof the node, 4 child nodes are generated for the corresponding node, anda decoding of layer numbers of the newly constructed nodes is performed.

However, when the reconstructed layer number is a maximum value, whichcan be allocated to layer numbers (that is, when a layer number startsfrom 0, a maximum value, which can be allocated to the layer number,corresponds to “a maximum partition layer value −1”), 4 child nodes aregenerated for the current node, but the decoding of layer numbers ofrespective nodes is not performed.

The tree is constructed until a layer number of the lowest nodes isequal to a level number of each node or the layer number has a maximumvalue, which can be allocated to the layer number, and each node layernumber reconstruction is continuously performed.

Thereafter, the partition type indicating information decoding for thelowest nodes is performed. Partition type indicating information ofrespective nodes is entropy-decoded by using a method prearrange betweenthe video encoding apparatus and the video decoding apparatus amonglossless compression encoding/decoding methods such as a binaryarithmetic coding, a Huffman coding, etc.

Further, an actual partition type indicating information value can bedecoded by using various binary coding methods such as a unary code, atruncated unary code, Exp-Golomb code, etc.

In addition, the video decoding apparatus performs an entropy decodingby using Tables 1 and 2 according to layer numbers of partition typeindicating information when the video encoding apparatus uses a binaryarithmetic coding, uses Table 1 in a case where a layer number is equalto or smaller than

${\log_{2}\left( \frac{N}{16} \right)},$and uses Table 2 in a case where the layer number is larger than

$\log_{2}\left( \frac{N}{16} \right)$as the partition type indicating information encoding method. Forexample, when partition type indicating information included in a layer1 is entropy-decoded, 2 bits are entropy-decoded and then partition typeindicating information is obtained using Table 1. When partition typeindicating information included in a layer 3 is entropy-decoded, Table 2is used. For example, 1 bit is first entropy-decoded. Then, when adecoded binary bit is 1, partition type indicating information is set to0 and a partition type indicating information entropy decoding of thecurrent subblock is terminated. When the decoded binary bit is not 1, 1bit is further entropy-decoded from the bitstream. When a secondlydecoded bit is 0, partition type indicating information of the currentsubblock is set to 1 and an entropy decoding for partition typeindicating information of the current subblock is terminated. When thesecondly decoded bit is 1, 1 bit is further entropy-decoded from thebitstream and it is determined whether partition type indicatinginformation of the current subblock is 2 or 3 by using Table 2.

Further, when it is prearranged between the video encoding apparatus andthe video decoding apparatus that partition types according to anotheraspect of the present disclosure shown in FIG. 34 are used, it can bedetermined whether the current subblock is split into 4 subblocks byentropy-decoding 1 bit for the partition type indicating informationdecoding.

Hereinafter, the decoding method according to the aspect of FIGS. 14Aand 14B will be described. A binary bit value encoded with partitioninformation in the video encoding apparatus is “101” in the aspect ofFIGS. 14A and 14B.

First, 1 bit is extracted and reconstructed from the bitstream forreconstructing a layer number of a level 0. Since the bit extracted fromthe bitstream is 1, a difference value for reconstructing the layernumber of the level 0 is 0. In a case of the level 0, since there is nohigher node, a layer value is reconstructed by adding a prearrangedvalue 0 between the video encoding apparatus and the video decodingapparatus and the reconstructed difference value. In this event, thedifference value is 0 and thus the reconstructed layer value becomes 0.

Since both the reconstructed layer value and the level value are 0, aprocess of decoding the layer number is terminated and partition typeindicating information is decoded.

Since a method of directly expressing a partition type indicatinginformation value with a binary bit when partition type indicatinginformation is encoded in the aspect of FIGS. 14A and 14B, the videodecoding apparatus also extracts 2 bits from the bitstream andreconstructs a value in the same way. Since a binary bit “01” isexpressed by an integer “1”, reconstructed partition type indicatinginformation becomes 1.

When shapes of subblocks of a macroblock are determined using thereconstructed layer value and partition type indicating information, allsubblocks within the macroblock are included in a layer 0, so that thesubblock has one of subblock types 64×64, 64×32, 32×64, and 32×32.Further, it can be derived that the macroblock is split into 2 subblocksof size 64×32 because partition type indicating information is 0.

Hereinafter, a decoding method according to the aspect of FIGS. 15 and16 is described. In the aspect of FIG. 16, a binary bit value encodedwith partition information in the video encoding apparatus is“01111100111001”.

First, 1 bit is extracted and reconstructed from the bitstream forreconstructing a layer number of a level 0. Since the bit extracted fromthe bitstream is 0, 1 bit is further extracted and reconstructed fromthe bitstream. Since the secondly reconstructed bit is 1, a differencevalue reconstruction for the layer number of the level 0 is terminated.Since the bitstream extracted for the difference value reconstruction is“01”, the difference value becomes 1, which corresponds to the number of0, and a value of 1 generated by adding the reconstructed differencevalue 0 and 0 is allocated as the layer number.

Since the reconstructed layer number 0 of the level 0 is larger than thelevel value 0, 4 child nodes included in a level 1 are generated in thecurrent node.

1 bit is extracted from the bitstream for reconstructing a layer numberof a first node of the level 1. Since the thirdly extracted bit is 1,the difference value becomes 0. The layer number 1 of the first node isreconstructed by adding the reconstructed difference value and the layernumber of the level 0, which is a higher node of the first node of thelevel 1. Since the reconstructed layer number 1 of the level 1 and thelevel value 1 are equal to each other, a difference value decoding for asecond node of the level 1 is started.

1 bit is extracted from the bitstream for reconstructing a layer numberof the second node of the level 1. Since the fourthly extracted bit is1, the difference value becomes 0. The layer number 1 of the second nodeis reconstructed by adding the reconstructed difference value and thelayer number of the level 0, which is a higher node of the second nodeof the level 1. Since the reconstructed layer number 1 of the level 1and the level value 1 are equal to each other, a difference valuedecoding for a third node of the level 1 is started.

1 bit is extracted from the bitstream for reconstructing a layer numberof the third node of the level 1. Since the fifthly extracted bit is 1,the difference value becomes 0. The layer number 1 of the third node isreconstructed by adding the reconstructed difference value and the layernumber of the level 0, which is a higher node of the third node of thelevel 1. Since the reconstructed layer number 1 of the level 1 and thelevel value 1 are equal to each other, a difference value decoding for afourth node of the level 1 is started.

1 bit is extracted from the bitstream for reconstructing a layer numberof the fourth node of the level 1. Since the sixthly extracted bit is 1,the difference value becomes 0. The layer number 1 of the fourth node isreconstructed by adding the reconstructed difference value and the layernumber of the level 0, which is a higher node of the fourth node of thelevel 1.

Since layer numbers of all nodes included in the level 1 arereconstructed and there is no node included in a level 2, the layernumber decoding is terminated and the partition type indicatinginformation decoding for respective nodes of the lowest level isperformed.

In the aspect of FIGS. 15 and 16, since partition type indicatinginformation is encoded by allocating binary bits “11”, “00”, “10”, and“01” to the partition type indicating information, the video decodingapparatus also reconstructs partition type indicating information byextracting 2 bits for respective nodes from the bitstream in the sameway.

Since there are 4 nodes included in the level 1 as nodes included in thelowest level in the aspect of FIGS. 15 and 16, partition type indicatinginformation is reconstructed by extracting 2 bits for respective nodesfrom the bitstream.

Since seventh and eighth bits extracted from the bitstream correspond to“00”, partition type indicating information for a first node is 1. Sinceninth and tenth bits extracted from the bitstream correspond to “11”,partition type indicating information for a second node is 0. Sinceeleventh and twelfth bits extracted from the bitstream correspond to“10”, partition type indicating information for a third node is 2. Sincethirteenth and fourteenth bits extracted from the bitstream correspondto “01”, partition type indicating information for a fourth node is 3.

When shapes of subblocks of a macroblock is determined using thereconstructed layer value and partition type indicating information, allsubblocks within the macroblock are included in a layer 1, so that a64×64 macroblock is split into 4 subblocks of size 32×32 and respective32×32 subblocks have one of subblock types 32×32, 32×16, 16×32, and16×16, which are included in the layer 1.

Since reconstructed partition type indicating information of a firstsubblock is 1, a first 32×32 subblock is split into 2 subblocks of size32×16. Since reconstructed partition type indicating information of asecond subblock is 0, a second 32×32 subblock is split into 1 subblockof size 32×32. In the same way, since reconstructed partition typeindicating information of a third subblock is 2, a third 32×32 subblockis split into 2 subblocks of size 16×32. Since reconstructed partitiontype indicating information of a fourth subblock is 3, a fourth 32×32subblock is split into 4 subblocks of size 16×16. The split subblocksare illustrated in FIG. 15.

Hereinafter, a decoding method according to the aspect of FIGS. 17 and18 is described. In the aspect of FIG. 18, a binary bit value encodedwith partition information in the video encoding apparatus is“01111010111100111010011111011111”.

First, 1 bit is extracted and reconstructed from the bitstream forreconstructing a layer number of a level 0. Since the bit extracted fromthe bitstream is 0, 1 bit is further extracted and reconstructed fromthe bitstream. Since the secondly reconstructed bit is 1, a differencevalue reconstruction for the layer number of the level 0 is terminated.Since the bitstream extracted for the difference value reconstruction is“01”, the difference value becomes 1, which corresponds to the number of0, and a value of 1 generated by adding the reconstructed differencevalue 0 and 0 is allocated as the layer number.

Since the reconstructed layer number 0 of the level 0 is larger than thelevel value 0, 4 child nodes included in a level 1 are generated in thecurrent node.

1 bit is extracted from the bitstream for reconstructing a layer numberof a first node of the level 1. Since the thirdly extracted bit is 1,the difference value becomes 0. The layer number 1 of the first node isreconstructed by adding the reconstructed difference value and the layernumber of the level 0, which is a higher node of the first node of thelevel 1. Since the reconstructed layer number 1 of the level 1 and thelevel value 1 are equal to each other, a difference value decoding for asecond node of the level 1 is started.

1 bit is extracted from the bitstream for reconstructing a layer numberof the second node of the level 1. Since the fourthly extracted bit is1, the difference value becomes 0. The layer number 1 of the second nodeis reconstructed by adding the reconstructed difference value and thelayer number of the level 0, which is a higher node of the second nodeof the level 1. Since the reconstructed layer number 1 of the level 1and the level value 1 are equal to each other, a difference valuedecoding for a third node of the level 1 is started.

1 bit is extracted from the bitstream for reconstructing a layer numberof the third node of the level 1. Since the fifthly extracted bit is 1,the difference value becomes 0. The layer number 1 of the third node isreconstructed by adding the reconstructed difference value and the layernumber of the level 0, which is a higher node of the third node of thelevel 1. Since the reconstructed layer number 1 of the level 1 and thelevel value 1 are equal to each other, a difference value decoding for afourth node of the level 1 is started.

1 bit is extracted from the bitstream for reconstructing a layer numberof the fourth node of the level 1. Since the sixthly extracted bit is 0,1 bit is further extracted and reconstructed from the bitstream. Sincethe seventhly extracted bit is 1, the difference value reconstructionfor the fourth node of the level 1 is terminated. Since the bitstreamextracted for the difference value reconstruction is “01”, thedifference value becomes 1, which is the number of 0, and a layer number2 is reconstructed by adding the reconstructed difference value and alayer number 1 of a higher node. Since the reconstructed layer number 2has a value larger than a level value 1, in which the current node isincluded, 4 child nodes are generated for the fourth node of thelevel 1. The generated child nodes are included in a level 2.

Since layer numbers of all nodes included in the level 1 arereconstructed, layer numbers of nodes included in the level 2 aredecoded in the same way.

The nodes included in the level 2 are child nodes of the fourth node ofthe level 1, and bits extracted for reconstructing a first node of thelevel 2 are “01”, which is an eighth bit and a ninth bit. Since adifference value between the first node of the level 2 and a layernumber 2 of a higher node is 1, a layer number of the current node is 3.In this event, since the reconstructed layer number 3 is larger than alevel value 2, 4 child nodes are generated. However, since thereconstructed layer value 3 has a maximum value, which can be allocatedto partition layer numbers, as described above, layer numbers are notdecoded for 4 newly generated nodes of a level 3.

Bits extracted for reconstructing a second node to a fourth node of thelevel 2 are “111”, which corresponds to a tenth bit to a twelfth bit.Since difference values of the 3 nodes are all 0, layer numbers ofsecond, third, fourth nodes of the level 2 are 2.

Since layer numbers of all nodes included in the level 2 have beenreconstructed and layer numbers of nodes included in the level 3 are notreconstructed, the layer number decoding is terminated and the partitiontype indicating information decoding for respective nodes of the lowestlevel is performed.

In the aspect of FIGS. 17 and 18, since partition type indicatinginformation is encoded by allocating binary bits “11”, “00”, “10”, and“01” to the partition type indicating information, the video decodingapparatus also reconstructs partition type indicating information byextracting 2 bits for respective nodes from the bitstream in the sameway.

Since there are 3 nodes included in the level 1, 4 nodes included in thelevel 3, and 3 nodes included in the level 2 as nodes included in thelowest level in the aspect of FIGS. 17 and 18, partition type indicatinginformation is reconstructed by extracting 2 bits for respective nodesfrom the bitstream.

When partition type indicating information is decoded in the same way asthat described through FIG. 16, bits extracted for decoding partitiontypes of 3 nodes included in the level 1 are sequentially “00”, “11”,and “10”, so that partition type indicating information of a first nodeof the level 1 is 1, partition type indicating information of a secondnode of the level 1 is 0, and partition type indicating information of athird node of the level 1 is 2.

Since bits extracted for decoding partition types of 4 nodes included inthe level 3 are sequentially “10”, “01”, “11”, and “11”, partition typeindicating information of a first node of the level 3 is 2, partitiontype indicating information of a second node of the level 3 is 3, andpartition type indicating information of a third node and a fourth nodeof the level 3 is 0, respectively.

Since bits extracted for decoding partition types of second to fourthnodes are sequentially “01”, “11”, and “11”, partition type indicatinginformation of a second node of the level 2 is 3, and partition typeindicating information of a third node and a fourth node of the level 2is 0, respectively.

When shapes of subblocks of a macroblock are determined by using thereconstructed layer value and partition type indicating information,layer numbers of subblocks within the macroblock have values equal to orlarger than 1, so that a 64×64 macroblock is split into 4 subblocks ofsize 32×32. Since layer numbers of first to third nodes of the level 1are 1, first to third 32×32 subblocks within the macroblock have one ofsubblock types 32×32, 32×16, 16×32, and 16×16, which are included in thelayer 1, respectively. Since reconstructed partition type indicatinginformation of the first 32×32 subblock is 1, the first 32×32 subblockis split into 2 subblocks of size 32×16. Since reconstructed partitiontype indicating information of the second 32×32 subblock is 0, thesecond 32×32 subblock is split into 1 subblock of size 32×32. In thesame way, since reconstructed partition type indicating information ofthe third 32×32 subblock is 2, the third 32×32 subblock is split into 2subblocks of size 16×32.

Since a reconstructed layer number of a fourth node of the level 1corresponding to a fourth 32×32 subblock is 2, the fourth 32×32 subblockis split into 4 subblocks of size 16×16, and 16×16 subblocks having alayer number larger than 2 among the split 16×16 subblocks correspondingto 4 nodes of the level 2 are split one more time to have a higherlayer. Here, since a reconstructed layer number of a first node of thelevel 2 is 3, the first 16×16 subblock is split into 4 subblocks of size8×8 again.

Thereafter, subblock types of respective subblocks are determinedaccording to partition type indicating information of the respectivesubblocks, which illustrated in FIG. 17.

B-2-2-3) Partition Information Decoding Method 3

Hereinafter, a decoding method according to the third method of encodingthe partition information is described.

According to the third method, block partition information can bedecoded by decoding partition layer values and partition flags.

Partition layer values are first extracted and reconstructed from thebitstream and then a macroblock is split according to the partitionlayer value. For example, when a macroblock size is N×N and thereconstructed partition layer value is x, the macroblock is split into

$\frac{N}{2^{x}} \times \frac{N}{2^{x}}$subblocks.

Thereafter, when a partition flag reconstructed by extracting andreconstructing the partition flag from the bitstream has a value (e.g.0) indicating that all

$\frac{N}{2^{x}} \times \frac{N}{2^{x}}$subblocks within the macroblock are not split into smaller subblocks, amacroblock partition information decoding is terminated.

When the partition flag has a value (e.g. 1) indicating that one or more

$\frac{N}{2^{x}} \times \frac{N}{2^{x}}$subblocks within the macroblock are split into smaller subblocks,partition layer value and partition flags of respective subblocks areextracted and reconstructed from the bitstream according to a rasterscan order in the same way.

Hereinafter, a decoding method of the aspect of FIG. 20 is described. Inthe aspect of FIG. 20, the partition layer value and partition flagencoded with partition information in the video encoding apparatus are{1, 1, 0, 2, 0, 1, 1, 0, 0, 0, 2, 3}.

A partition layer value is first extracted from the bitstream, and apartition layer value 1 and a partition flag 1 are decoded. Since thepartition layer value is 1, a 64×64 macroblock is split into 4 subblocksof size 32×32.

Since the decoded partition flag is 1, a partition layer value and apartition flag are continuously decoded for each 32×32 subblock.

Since a partition layer value of a first 32×32 subblock is 0, it can bederived that the first 32×32 subblock is not split into smallersubblocks. In this event, a partition flag is not decoded from thebitstream.

A partition layer value of a second 32×32 subblock is extracted anddecoded from the bitstream. Since the reconstructed partition layervalue is 2, the 32×32 subblock is split into 16 subblocks of size 8×8and a partition flag is subsequently extracted and decoded from thebitstream. Since the reconstructed partition flag is 0, it can bederived that the 16 subblocks within the second 32×32 subblock are notsplit into smaller subblocks and a partition layer value of a third32×32 subblock is extracted and decoded from the bitstream.

Since the reconstructed partition layer value is 1, the 32×32 subblockis split into 4 subblocks of size 16×16 and a partition flag is decodedfrom the bitstream. Since the decoded partition flag is 1, it can bederived that one or more 16×16 subblocks are split into smallersubblocks and a partition layer value and a partition flag are decodedfor each 16×16 subblock.

In the same way, the partition layer value is extracted andreconstructed from the bitstream for each 16×16 subblock. Then, when thepartition layer value is not 0, a partition flag is extracted andreconstructed from the bitstream.

It can be derived from the above described aspect that partition layervalues of first to third 16×16 subblocks are all 0 and the partitionlayer value of the fourth 16×16 subblock is 2.

Since the partition layer value of the fourth 16×16 subblock is 2, the16×16 subblock is split into 16 subblocks of size 4×4. However, in thisevent, a partition flag is not decoded because each 4×4 subblock cannotbe split into smaller subblocks although the reconstructed layer valueis not 0.

Thereafter, the partition layer value of the fourth 32×32 subblock isextracted and decoded from the bitstream. In this event, since thereconstructed partition layer value is 3, the 32×32 subblock is splitinto 64 subblocks of size 4×4, and the partition information decoding isterminated because a split subblock size is a minimum block size.

The aforementioned partition layer value and partition flag areextracted and decoded from the bitstream, and the partition layer valueis decoded by using a prearranged method between the video encodingapparatus and the video decoding apparatus among various binary codingmethods such as a unary code, a truncated unary code, an Exp-Golombcode, etc.

Alternatively, the partition layer value can be decoded by using methodssuch as a binary arithmetic coding, a Huffman coding, etc.

Alternatively, an index value of a prearranged table between the videoencoding apparatus and the video decoding apparatus can be decoded byusing the aforementioned various binary encoding/decoding methods.

The partition flag is used for determining whether the current subblockis split into smaller subblocks by extracting and decoding 1 bit fromthe bitstream.

B-2-2-4) Partition Information Decoding Method 4

Hereinafter, a decoding method according to the fourth method ofencoding the partition information is described.

The fourth method of decoding the partition information is similar tothe first method of decoding the partition information. However,partition type indicating information is continuously extracted anddecoded from the bitstream until partition type indicating informationof all subblocks has a value (e.g. 0) indicating that the subblock isnot split into smaller subblocks or a size of a subblock split from thecurrent block according to partition type indicating information is aminimum subblock size.

Hereinafter, a decoding method according to the aspect of FIGS. 21 and22 is described. According to the aspect of FIG. 22, partition typeindicating information encoded with partition information in the videoencoding apparatus is {1, 1, 0, 0, 2, 0, 0}.

Since firstly reconstructed partition type indicating information is 1,a 64×64 macroblock is split into 2 subblocks of size 64×32 (L1-P0 andL1-P1), and partition type indicating information of a first 64×32subblock is extracted and reconstructed from the bitstream.

Since secondly reconstructed partition type indicating information is 1,the 64×32 subblock is split into 2 subblocks of size 64×16 (L2-P0 andL2-P1), and partition type indicating information of a first 64×16subblock (L2-P0) is extracted and reconstructed from the bitstream.

Since thirdly reconstructed partition type indicating information is 0,the 64×16 subblock corresponding to the L2-P0 subblock is not split intosmaller subblocks, and partition type indicating information of thesubblock L2-P1, which is a subsequent subblock of the L2-P0 subblock, isextracted and reconstructed from the bitstream.

Since fourthly reconstructed partition type indicating information is 0,the 64×16 subblock is not split into smaller subblocks. Since partitioninformation of subblocks included in the L2 has been all reconstructed,partition type indicating information of the L1-P1 subblock is extractedand reconstructed from the bitstream.

Since fifthly reconstructed partition type indicating information is 2,the 64×32 subblock corresponding to the L1-P1 subblock is split into 2subblocks of size 32×32 (L2-P0 and L2-P1), and partition type indicatinginformation of a first 32×32 subblock (L2-P0) is extracted andreconstructed from the bitstream.

Since sixthly reconstructed partition type indicating information is 0,the 32×32 subblock corresponding to the L2-P0 subblock is not split intosmaller subblocks, and partition type indicating information of thesubblock L2-P1, which is a subsequent subblock of the L2-P0 subblock, isextracted and reconstructed from the bitstream.

Since seventhly reconstructed partition type indicating information is0, the 32×32 subblock corresponding to the L2-P1 subblock is not splitinto smaller subblocks. Since block types of all subblocks within themacroblock have been determined, the partition information decoding isterminated.

In this event, the partition type indicating information isentropy-decoded by a method prearrange between the video encodingapparatus and the video decoding apparatus among lossless compressionencoding/decoding methods such as a binary arithmetic coding, a Huffmancoding, etc.

Further, an actual partition type indicating information value can bedecoded by using various binary coding methods such as a unary code, atruncated unary code, Exp-Golomb code, etc.

In addition, the video decoding apparatus performs an entropy decodingby using Tables 1 and 2 according to layer numbers of partition typeindicating information when the video encoding apparatus uses a binaryarithmetic coding, uses Table 1 in a case where a layer number is equalto or smaller than

${\log_{2}\left( \frac{N}{16} \right)},$and uses Table 2 in a case where the layer number is larger than

$\log_{2}\left( \frac{N}{16} \right)$as the partition type indicating information encoding method.

For example, when partition type indicating information included in alayer 1 is entropy-decoded for a 64×64 macroblock, 2 bits areentropy-decoded and then partition type indicating information isobtained using Table 1.

When partition type indicating information included in a layer 3 isentropy-decoded for the 64×64 macroblock, Table 2 is used. First, 1 bitis entropy-decoded. Then, when a decoded binary bit is 1, partition typeindicating information is set to 0 and a partition type indicatinginformation entropy decoding of the current subblock is terminated. Whenthe decoded binary bit is not 1, 1 bit is further entropy-decoded fromthe bitstream. When a secondly decoded bit is 0, partition typeindicating information of the current subblock is set to 1 and anentropy decoding for partition type indicating information of thecurrent subblock is terminated. When the secondly decoded bit is 1, 1bit is further entropy-decoded from the bitstream and it is determinedwhether partition type indicating information of the current subblock is2 or 3 by using Table 2.

Further, when it is prearranged between the video encoding apparatus andthe video decoding apparatus that partition types according to anotheraspect of the present disclosure shown in FIG. 34 are used, it can bedetermined whether the current subblock is split into 4 subblocks byentropy-decoding 1 bit for the partition type indicating informationdecoding.

B-2-3) Decoding Flowchart

FIG. 25 is a flowchart for illustrating a video decoding methodaccording to another aspect of the present disclosure.

According to the video decoding method according to another aspect ofthe present disclosure, the video decoding apparatus 2400 reconstructspartition information of a current block by decoding partitioninformation data from the bitstream by using the decoding methodsaccording to the aforementioned aspects in step S2510, and reconstructsthe current block split into a plurality of subblocks by performing apredictive encoding on encoded image data extracted from the bitstreamaccording to partition information of the reconstructed current block instep S2520.

As described above, according to another aspect of the presentdisclosure, even when a macroblock having a block size equal to orlarger than a size 16×16 is split into various sizes of subblocks, thecompression efficiency can be improved by encoding macroblock partitioninformation with the small number of bits by using a partition type foreach layer or a partition layer value.

C) Maximum Partition Layer Information Encoding and Decoding

Hereinafter, as another aspect of the present disclosure, an apparatusand a method for determining a maximum partition layer indicating thenumber of layers by which a macroblock having an arbitrary size can bemaximally split in order to efficiently partition information, splittingthe macroblock into a plurality of subblocks for the prediction or thetransform by using the determined maximum partition layer, and thenefficiently encoding and decoding partition information by using themaximum partition layer are described. Here, an available minimumsubblock size within the macroblock can be determined by the maximumpartition layer, and an image is encoded by using only subblocks havinga size equal to or larger than a corresponding size in encoding themacroblock.

The maximum partition layer may be information indicating a minimumsubblock size which can be used for the prediction or the transform andencoded in the sequence header, the header of each picture, the sliceheader, or the macroblock header. Further, maximum partition layerinformation for the prediction and maximum partition layer informationfor the transform may be encoded, respectively.

In addition, partition information may be information indicating sizesand shapes of subblocks split for the prediction or the transform. Thepartition information and encoded image data are included in thebitstream and encoded, and then transmitted to the video decodingapparatus. Furthermore, partition information for the prediction andpartition information for the transform may be encoded, respectively.

In the decoding, sizes and shapes of subblocks are reconstructed byextracting and decoding maximum partition layer data from the bitstreamand then extracting and decoding partition information of the subblocksfor the prediction or the transform by using the reconstructed maximumpartition layer. Thereafter, an image is reconstructed through theprediction or the inverse transform by extracting and reconstructingencoded data of respective subblocks from the bitstream.

C-1) Video Encoding Apparatus

C-1-1) Encoding Apparatus

FIG. 26 is a schematic block diagram for illustrating a video encodingapparatus according to yet another aspect of the present disclosure.

The video encoding apparatus 2600 according to yet another aspect of thepresent disclosure may include a video encoder 2610, a maximum partitionlayer determiner 2620, and a maximum partition layer encoder 2630.

The video encoder 2610 can be implemented as the video encodingapparatus 800 according to an aspect of the present disclosure describedthrough FIG. 8. That is, the video encoder 2610 generates encodedpartition information and image data by performing a predictive encodingby using subblocks according to predetermined partition types of amacroblock. In this event, the video encoder 2610 can determinepartition types by using a minimum subblock size according to a maximumpartition layer value determined by the maximum partition layerdeterminer 2620 in determining partition types of the macroblock.Further, the video encoder 2610 encodes partition information by using amaximum partition layer in encoding partition information.

The maximum partition layer determiner 2620 determines a partition typeof a current block by using a minimum subblock size according to maximumpartition layer value candidates, and determines a maximum partitionlayer value of the current block by using an encoding cost generated inan encoding. In this event, a partition type of the current block isdetermined by using the minimum subblock size according to the maximumpartition layer value candidates, and the encoding cost generated in theencoding can be calculated by the maximum partition layer determiner2620 itself. However, if the maximum partition layer determiner 2620designates the maximum partition layer value candidates, the videoencoder 2610 determines the partition type of the current block by usingthe minimum subblock size according to a corresponding partition layervalue candidate, calculates encoding costs generated in the encoding totransmit the encoding costs to the maximum partition layer determiner2620. Then, the maximum partition layer determiner 2620 can determinethe maximum partition layer value of the current block by using thetransmitted encoding costs. Once the maximum partition layer value ofthe current block is determined, the video encoder 2610 includes animage already encoded into the corresponding maximum partition layervalue in the bitstream. A method in which the maximum partition layerdeterminer 2620 determines the maximum partition layer value andaccordingly determines the minimum subblock size will be discussed inthe following description in detail.

The maximum partition layer encoder 2630 generates encoded maximumpartition layer data by encoding the maximum partition layer value, andincludes the generated data in the bitstream.

C-1-2) Relation Between Partition Layer and Minimum Subblock Size

The macroblock size, the minimum subblock size, and maximum partitionlayer (MaxLayer) corresponding to a layer value, which can be maximallyused, can be set by using each other.

That is, the macroblock size can be obtained using the maximum partitionlayer (MaxLayer) and the minimum block size, and the minimum subblocksize can be obtained using the macroblock size and the maximum partitionlayer.

When the minimum subblock size is N×N, the maximum block size(N×2MaxLayer)×(N×2MaxLayer). In a case of the macroblock of a N×N pixel,the minimum block size is (N/(2MaxLayer))×(N/(2MaxLayer)).

FIG. 27 is an exemplary diagram for illustrating the relation betweenthe partition layer and the minimum subblock size according to yetanother aspect of the present disclosure.

Referring to FIG. 27, when a macroblock size is M×N and a partitionlayer value is x, an available minimum subblock size is

$\frac{N}{2^{x}} \times {\frac{N}{2^{x}}.}$For example, when a partition layer value of a macroblock having a blocksize of 64×64, an available minimum subblock size is 4×4. Here, thepartition layer value is differently applied for a width and a height,that is, M and N of the macroblock having the block size of M×N.

Accordingly, the maximum partition layer determiner 2620 can determine aminimum subblock size by determining a maximum partition layer value forthe macroblock. For this purpose, the maximum partition layer determiner2620 calculates encoding costs for candidate partition layer values andcan determine a maximum layer value by using the encoding costs for thecandidate partition layer values. Hereinafter, a method of determining amaximum partition layer value for the macroblock is described based onan assumption that a macroblock size is M×N (M is an integer equal to orlarger than 16).

C-1-3) Maximum Partition Layer Determining Method

FIG. 28 is a flowchart for illustrating an example of a method ofdetermining a maximum partition layer value according to yet anotheraspect of the present disclosure.

The maximum partition layer determiner 2620 sets an initial value of x,which is a maximum partition layer value candidate, to log₂(M/16) instep S2810, determines a partition type of the macroblock by using aminimum subblock size (M/2^(x))×(M/2^(x)) when the maximum partitionlayer value candidate is x and calculates encoding costs (hereinafter,referred to as “xcost”) when one frame (arbitrary frame) of an image isencoded according to the determined partition type in step S2820,determines a partition type of the macroblock by using a minimumsubblock size (M/2^(x+1))×(M/2^(x+1)) when the maximum partition layervalue candidate is x+1 and calculates encoding costs (hereinafter,referred to as “x+1 cost”) when the arbitrary frame is encoded in stepS2830, and compares xcost and x+1 cost to determine whether xcost issmaller than x+1 cost in step S2840.

As a result of the determination of step S2840, when xcost is smallerthan x+1 cost, the maximum partition layer determiner 2620 determines xas the maximum partition layer value in step S2850. As a result of thedetermination of step S2840, when xcost is equal to or larger than x+1cost, the maximum partition layer determiner 2620 determines whether x+1is log₂(M/4) in step S2860. When x+1 is not log₂(M/4), the maximumpartition layer determiner 2620 sets x to x+1 in step S2870 and proceedsto step S2820. When x+1 is log₂(M/4), the maximum partition layerdeterminer 2620 determines x+1 as the maximum partition layer value instep S2880.

FIG. 29 is a flowchart for illustrating another example of the method ofdetermining the maximum partition layer value according to anotheraspect of the present disclosure.

The maximum partition layer determiner 2620 sets an initial value of x,which is a maximum partition layer value candidate, to log₂(M/16) instep S2910, determines a partition type of the macroblock by using aminimum subblock size (M/2^(x))×(M/2^(x)) when the maximum partitionlayer value candidate is x and calculates encoding costs (hereinafter,referred to as “xcost”) when one frame (arbitrary frame) of an image isencoded according to the determined partition type in step S2920,determines a partition type of the macroblock by using a minimumsubblock size (M/2^(x+1))×(M/2^(x+1)) when the maximum partition layervalue candidate is x+1 and calculates encoding costs (hereinafter,referred to as “x+1 cost”) when the arbitrary frame is encoded in stepS2930, and compares xcost and x+1 cost to determine whether xcost issmaller than x+1 cost in step S2940.

As a result of the determination of step S2940, when xcost is equal toor larger than x−1 cost, the maximum partition layer determiner 2620sets x to x−1 in step S2950 and proceeds to step S2920. When xcost issmaller than x−1 cost, the maximum partition layer determiner 2620determines x as the maximum partition layer value in step S2960.

The maximum partition layer determiner 2620 can determine the maximumpartition layer value by using not only the methods described throughFIGS. 28 and 29 but also other methods. That is, as yet another exampleof determining the maximum partition layer value, the maximum partitionlayer determiner 2620 calculates an encoding cost for each maximumpartition layer value candidate available for the macroblock and candetermine a maximum partition layer value candidate having a smallestencoding cost as the maximum partition layer value by comparingcalculated encoding costs with each other.

C-1-4) Partition Information Encoding Method

Hereinafter, a method of encoding partition information by using themaximum partition layer value according to yet another aspect of thepresent disclosure is described.

As described above, once the maximum partition layer value, whichindicates the total number of layers, is determined, partition layersavailable in the macroblock are determined. However, layers, which arenot used, may exist in the determined available partition layers. Inthis event, it may be unnecessary to encode partition type indicatinginformation for the layers, which are not used.

Therefore, according to yet another aspect of the present disclosure,information on partition layers selected to be used among availablepartition layers determined by the maximum partition layer value can beincluded in the bitstream, and partition information of the currentblock can be encoded using only the selected partition layers wheninformation on whether respective layers are available is transmitted tothe bitstream. In the method of encoding block partition information,the aforementioned various partition information encoding methods can beused.

When a macroblock size is 64×64 and a maximum partition layer value is2, layers 0 and 1 are available layers and layers 2 and 3 are notavailable layers. Accordingly, the macroblock can be split intosubblocks of sizes 64×64, 64×32, 32×64, and 32×32, which correspond to asubblock type included in the layer 0, and subblocks of sizes 32×32,32×16, 16×32, and 16×16, which correspond to a subblock type included inthe layer 1. However, the macroblock cannot be split into subblocks ofsizes 16×8, 8×16, 8×8, 8×4, 4×8, and 4×4, which correspond to subblocktypes included in the layers 2 and 3. That is, respective 16×16subblocks cannot be split into smaller subblocks.

In this event, the number of bits required for a partition informationencoding can be reduced by transmitting the maximum partition layervalue to the bitstream and using the maximum partition layer value. Thevideo decoding apparatus extracts and reconstructs the maximum partitionlayer value form the bitstream, sets all higher layers of thereconstructed maximum partition layer as available layers, and setslower layers of the reconstructed maximum partition layer as unavailablelayers. Then, the video decoding apparatus decodes partition informationby using the set information.

Alternatively, when types of subblocks included in a specific layer arenot used, a macroblock of, for example, size 64×64 is split into 4subblocks of size 32×32. When respective 32×32 subblocks are all splitinto subblocks having a size equal to or smaller than a size 16×16, itcan be derived that subblock types of subblocks included in the layer 1are not used, and the layer 1 can be selected as the unavailable layer.

In this event, it is possible to reduce the number of bits required forthe partition information encoding by encoding information on whetherrespective layers are available into the bitstream. The video decodingapparatus extracts and reconstructs the information on whetherrespective layers are available from the bitstream, and then decodespartition information by using the reconstructed information on whetherthe respective layers are available.

As described above, according to yet another aspect of the presentdisclosure, partition information can be encoded by encoding a themaximum partition layer value into the bitstream and using onlyavailable partition layers determined by the maximum partition layervalue.

Alternatively, the partition information can be encoded by including andencoding information on whether respective layers are available amongavailable partition layers determined by the maximum partition layervalue into the bitstream and using only available partition layers.

The maximum partition layer value and/or flag information on whetherrespective partition layers are available can be included and encoded inthe sequence header, the header of each picture, or the slice header.

In this event, the maximum partition layer value can be encoded by usinga lossless compression coding such as a binary arithmetic coding, aHuffman coding, etc, and various binary coding methods such as a unarycode, a truncated unary code, an Exp-Golomb code, etc.

In the method of encoding the information indicating whether respectivelayers are available, a flag having a 1 bit length indicating whethereach layer is available can be encoded by using methods such as a binaryarithmetic coding, a Huffman coding, etc.

Alternatively, an index of a table in which information indicatingwhether respective layers are available is arranged can be encoded. Inthis event, the index of the table can be encoded by using variousbinary coding methods such as a unary code, a truncated uary code, anExp-Golomb code, etc.

Alternatively, a layer flag for a used layer is set to 1, a layer flagfor a not-used layer is set to 0, and an integer value allowing a LeastSignificant Bit (LSB) to indicate whether a highest layer is available.Then, the generated integer value can be encoded by using various binarycoding methods such as a unary code, a truncated unary code, anExp-Golomb code, etc.

Further, the integer value can be generated by setting a layer flag fora used layer to 0, a layer flag for a not-used layer to 1, and allowingthe Least Significant Bit (LSB) to indicate whether the highest layer isavailable.

FIG. 30 is an exemplary diagram for illustrating a process of encodingpartition information of the current block by using only selectedpartition layers according to yet another aspect of the presentdisclosure. FIG. 30 illustrates an example of encoding partitioninformation of the block by encoding the maximum partition layer and/orinformation indicating whether respective layers are available, encodingthe maximum partition layer value and data (Layer Flag) indicatingwhether respective layers are available by using the information throughvarious methods of encoding partition information, and then encodingpartition type indicating information by using the information.

In FIG. 30, when it is assumed that a macroblock size is 64×64, amaximum partition layer is 4, layers 0 and 3 are available, and layers 1and 2 are not available, the macroblock can be split into subblocks ofsizes 64×64, 64×32, 32×64, and 32×32, which correspond to a subblocktype included in the layer 1. When the macroblock is split intosubblocks of size 32×32, each 32×32 subblock can be split into subblocksof sizes 8×8, 8×4, 4×8, and 4×4, which correspond to a subblock typeincluded in the layer 3. That is, when the 32×32 subblock is splitaccording to partition type indicating information shown in FIG. 10, the32×32 subblock is split into 16 subblocks of size 8×8.

After a maximum partition layer value 4 is first encoded by using theaforementioned method of encoding the maximum partition layer value, alayer flag for a used layer is set to 1, a layer flag for a not-usedlayer is set to 0, and a 1 bit flag indicating whether each layer isavailable is encoded. According to the aspect of FIG. 30, an availablelayer flag is encoded into “1001” from a higher layer to a lower layer.

Thereafter, macroblock partition information is encoded by using theaforementioned various partition information encoding methods. Theaspect of FIG. 30 shows a method using the partition type indicatinginformation encoding method, which is the first method among partitioninformation encoding methods, based on subblock types shown in FIG. 10.

Here, when a N×N block of a layer number K is split into 4 subblocks, amethod of allocating a layer number to the split subblocks is differentdepending on whether respective layers are available. If a layer K+1 isavailable, a layer number K+1 is allocated to the subblocks. If thelayer K+1 is not available, the layer number K is allocated to thesubblocks.

For example when a macroblock size is 64×64, a 32×32 subblock can bedetermined as a subblock type included in a layer 0 or determined as asubblock type included in a layer 1. In this event, when the layer 1 isan available layer, the 32×32 subblock is allocated a layer number 1.When the layer 1 is not available, the 32×32 subblock is allocated alayer number 0.

Since the macroblock is split into 4 subblocks, partition typeindicating information 3 is first encoded and partition type indicatinginformation of the 4 subblocks of size 32×32 is encoded.

Since a first 32×32 subblock (L0-P0) is not split, partition typeindicating information 0 is encoded, and partition type indicatinginformation of a second 32×32 subblock (L0-P1) is encoded.

Since the second 32×32 subblock (L0-P1) is split into 16 subblocks ofsize 8×8 (L2-P0 to L2-P14), partition type indicating information 3 isencoded. Here, the 8×8 subblock may be a 8×8 block included in a layer 2and or may be a subblock included in layer 3, and a layer number 3 isallocated because the layer 2 is not available.

Thereafter, partition type indicating information of 16 subblocks ofsize 8×8 within the L0-P0 subblock is all encoded, and partition typeindicating information of a third 32×32 subblock (L0-P2) is encoded.

Since the third 32×32 subblock (L0-P2) is split into 16 subblocks ofsize 8×8 (L2-P0 to L2-P15), partition type indicating information 3 isencoded, partition type indicating information of 16 subblocks of size8×8 within the L0-P2 subblock is all encoded, and partition typeindicating information 0 of a fourth 32×32 subblock (L0-P2) is encoded.

Accordingly, the video encoding apparatus 2600 according to yet anotheraspect of the present disclosure can encode partition information of acorresponding macroblock by encoding layer flags and partition typeindicating information for partition numbers for respective layers.

C-1-5) Encoding Flowchart

FIG. 31 is a flowchart for illustrating a video encoding methodaccording to yet another aspect of the present disclosure.

According to the video encoding method according to yet another aspectof the present disclosure, the video encoding apparatus 2600 generates amaximum partition layer and/or data indicating whether respectivepartition layers are available by determining and encoding a maximumpartition layer value and/or information indicating whether therespective partition layers are available in step S3110, performing apredictive encoding on a current block by using a minimum subblock sizedetermined according to a maximum partition layer value and subblocksdetermined according to whether respective layers are available in stepS3120, and generates an encoded maximum partition layer and/or abitstream including data indicating whether receptive layers areavailable and encoded image data in step S3130. The bitstream generatedas described above is transmitted to the video decoding apparatus anddecoded.

The video encoding apparatus 2600 can determine a maximum partitionlayer value by using encoding costs for maximum partition layer valuecandidates in step S3110. The video encoding apparatus 2600 candetermine the maximum partition layer value by increasing or decreasingvalues of the maximum partition layer value candidates. Furthermore, thevideo encoding apparatus 2600 can determine a maximum partition layervalue candidate having the smallest encoding cost as the maximumpartition layer value by comparing encoding costs of respective maximumpartition layer value candidates.

C-2) Decoder

C-2-1) Block Diagram and Description of Video Decoding Apparatus

FIG. 32 is a schematic block diagram for illustrating a video decodingapparatus according to yet another aspect of the present disclosure.

The video decoding apparatus 3200 according to yet another aspect of thepresent disclosure may include a maximum partition layer decoder 3210and a video decoder 3220.

The maximum partition layer decoder 3210 decodes encoded maximumpartition layer data extracted from the bitstream to reconstruct amaximum partition layer value.

The video decoder 2420 may be equally or similarly constructed to thevideo decoding apparatus according to an aspect of the presentdisclosure described with reference to FIG. 7. However, the videodecoder 3220 according to yet another aspect of the present disclosureperforms a predictive decoding on encoded image data extracted from thebitstream by using a minimum subblock size based on the maximumpartition layer value reconstructed by the maximum partition layerdecoder 3210, to reconstruct a current block.

C-2-2) Partition Information Decoding Method

Hereinafter, a method of decoding partition information by using amaximum partition layer value according to yet another aspect of thepresent disclosure is described.

The video decoding apparatus extracts a maximum partition layerrepresenting the total number of layers and/or data indicating whethereach layer is available from a prearranged position between the videodecoding apparatus and the video encoding apparatus among a sequenceheader, a header of each picture, or a slice header of the bitstream,and then decodes partition information of each block by using theextracted information through the aforementioned various partitioninformation decoding methods.

In a method of decoding the maximum partition layer and/or informationon available layers, maximum partition layer data is first extracted anddecoded from the bitstream, and data indicating whether each layer isavailable, available subblock types, and a minimum subblock sizeaccording to the data indicating whether each layer is available areextracted by using the decoded maximum partition layer value. Forexample, when a macroblock size is 64×64 and a maximum partition layervalue extracted and reconstructed from the bitstream is 3, layers 0, 1,and 2 are set as available layers and a layer 3 is set as an unavailablelayer. The macroblock can be split into subblocks of sizes 64×64, 64×32,32×64, and 32×32, which correspond to a subblock type included in thelayer 0, subblocks of sizes 32×32, 32×16, 16×32, and 16×16, whichcorrespond to a subblock type included in the layer 1, and subblocks ofsizes 16×16, 16×8, 8×16, and 8×8, which correspond to a subblock typeincluded in the layer 2. However, the macroblock cannot be split intosubblocks of sizes 8×4, 4×8, and 4×4, which corresponds to a subblocktype included in the layer 3. That is, respective 8×8 blocks cannot besplit into smaller subblocks. In this event, an available minimumsubblock size is determined as a size 8×8.

Alternatively, after the maximum partition layer data is extracted andreconstructed from the bitstream, the data indicating whether each layeris available, which corresponds to the number of layers determined bythe reconstructed maximum partition layer value, is extracted anddecoded from the bitstream. Then, available subblock types and a minimumsubblock size are extracted according to the reconstructed maximumpartition layer value and the availability of each layer.

For example, when a macroblock size is 64×64 and a maximum partitionlayer value extracted and reconstructed from the bitstream is 3, dataindicating whether 3 layers are available is extracted and decoded fromthe bitstream. When the reconstructed data indicating whether each layeris available means that the layers 0 and 2 are available and the layer 1is not available, the macroblock can be split into subblocks of sizes64×64, 64×32, 32×64, and 32×32, which correspond to a subblock typeincluded in the layer 0, and subblocks of sizes 16×16, 16×8, 8×16, and8×8, which correspond to a subblock type included in the layer 2.However, the macroblock cannot be split into subblocks of sizes 32×32,32×16, 16×32, and 16×16, which correspond to a subblock type included inthe layer 1, and subblocks of sizes 8×4, 4×8, and 4×4, which correspondsto a subblock type included in the layer 3.

Alternatively, the video decoding apparatus determines a maximumpartition layer value by using a minimum subblock size and a prearrangedmacroblock size between the video decoding apparatus and the videoencoding apparatus and extracts and decodes data indicating whetherrespective layers are available, which corresponds to the number oflayers determined by the maximum partition layer value, from thebitstream, to determine available subblock types according to thereconstructed data indicating whether the respective layers areavailable. For example, when the prearranged macroblock size between thevideo encoding apparatus and the video decoding apparatus is 32×32 andthe minimum subblock size is 8×8, the number of maximum partition layersis 2. Accordingly, data indicating whether the 2 layers are available isextracted and decoded from the bitstream. When the reconstructed dataindicating whether the respective layers are available means that thelayer 0 is not available and the layer 1 is available, the macroblockcan have only block types of 16×16, 16×8, 8×16, and 8×8, whichcorrespond to subblock types included in the layer 1. Therefore, indecoding partition information of the macroblock, the macroblock issplit into 4 subblocks of size 16×16 and only each 16×16 partitioninformation is extracted and decoded from the bitstream.

In this event, the maximum partition layer value can be decoded by usinga prearranged method between the video encoding apparatus and the videodecoding apparatus among methods such as a binary arithmetic coding, aHuffman coding, etc.

Alternatively, the maximum partition layer value can be decoded by usingmethods such as a unary code, a truncated unary code, an Exp-Golombcode, etc.

In a method of decoding information indicating whether each layer isavailable, data indicating whether each layer is available can bedecoded by using a prearranged method between the video encodingapparatus and the video decoding apparatus among methods such as abinary arithmetic coding, a Huffman coding, etc.

Alternatively, an index of a table showing whether respective layers areused is decoded by using methods such as a unary code, truncated unarycode, an Exp-Golomb code, etc., and a fact indicating whether therespective layers are used can be extracted by using a prearranged tablebetween the video encoding apparatus and the video decoding apparatus.

Alternatively, an integer value is decoded by using methods such as aunary code, truncated unary code, an Exp-Golomb code, etc., and thedecoded integer value can be decoded by representing the integer valueinto a binary bit having a maximum partition layer value as the numberof bits.

Hereinafter, a decoding method according to an aspect of FIG. 30 isdescribed.

According to the aforementioned aspect of FIG. 30, in data encoded withpartition information in the video encoding apparatus, maximum partitioninformation is 4, a layer flag indicating whether respective layers areused is “1001”, and partition type indicating information is {3, 0, 3,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0, 0, 0, 0, 0}.

The video decoding apparatus extracts and decodes maximum partitionlayer data from the bitstream, and reconstructs a maximum partitionlayer value 4. Since the maximum partition layer is 4, a flag (layerflag) indicating whether 4 layers are available is reconstructed.Layer_Flag of the layer 0 is decoded by extracting and decoding 1 bitfrom the bitstream. After a flag indicating whether the layer 0 isavailable is reconstructed, Layer_Flag of the layers 1, 2, and 3 isextracted and decoded from the bitstream in the same way. Since thereconstructed Layer_Flag of the layer 0 is 1, the reconstructedLayer_Flag of the layer 1 is 0, the reconstructed Layer_Flag of thelayer 2 is 0, and the reconstructed Layer_Flag of the layer 3 is 1, thelayers 0 and 3 are set as available layers and the layers 1 and 2 areset as unavailable layers. Then, the information is used for decodingpartition information of the macroblock.

Since firstly reconstructed partition type indicating information is 3,the macroblock is split into 4 subblocks of size 32×32, and partitiontype indicating information of each 32×32 subblock is extracted anddecoded from the bitstream.

Here, when a N×N block of a layer number K is split into 4 subblocks, amethod of allocating a layer number to the split subblocks is differentdepending on whether respective layers are available. If a layer K+1 isavailable, a layer number K+1 is allocated to the subblocks. If thelayer K+1 is not available, the layer number K is allocated to thesubblocks.

According to the aspect of FIG. 30, 32×32 subblocks split from themacroblock correspond to a subblock type which can be included both thelayer 0 and the layer 1, but a layer number of the 32×32 subblock is 0because the layer 1 is not available.

Since secondly reconstructed partition type indicating information is 0,a subblock type of a first 32×32 subblock (L0-P0) within the macroblockis 32×32. Since partition type indicating information of the first 32×32subblock is not 3, partition type indicating information of a second32×32 subblock (L0-P1) is decoded.

Since thirdly reconstructed partition type indicating information is 3and the layers 1 and 2 are not available, the L0-P1 subblock is splitinto 16 subblocks (L3-P0 to L3-P15) of size 8×8, and partition typeindicating information of each 8×8 subblock is extracted and decodedfrom the bitstream because the 8×8 subblock can be split into smallersubblocks.

Since fourthly to nineteenthly reconstructed partition type indicatinginformation are all 0, it can be derived that all subblock types ofsubblocks L3-P0 to L3-P15 split from the subblock L0-P1 are 8×8.

Since twentiethly reconstructed partition type indicating information is3 and the layers 1 and 2 are not available, the L0-P2 subblock is splitinto 16 subblocks (L3-P0 to L3-P15) of size 8×8, and partition typeindicating information of each 8×8 subblock is extracted and decodedfrom the bitstream because the 8×8 subblock can be split into smallersubblocks.

Since subsequently reconstructed partition type indicating informationis 2, the L3-P0 subblock included in the L0-P2 subblock is split into 2subblocks of size 4×8, and subblock types of subblocks L3-P1 to L3-P15are all set to 8×8 because 15 partition type indicating informationpieces reconstructed since then are all 0.

Since lastly reconstructed partition type indicating information is 0, asubblock type of the L0-P3 subblock is 32×32, and the partitioninformation decoding process is terminated because partition types ofall subblocks within the macroblock have been determined.

C-2-1) Decoding Flowchart

FIG. 33 is a flowchart for illustrating a video decoding methodaccording to yet another aspect of the present disclosure.

Based on the video decoding method according to yet another aspect ofthe present disclosure, the video decoding apparatus 3200 decodesencoded maximum partition layer data extracted from the bitstream toreconstruct a maximum partition layer value in step S3310, and performsa predictive decoding on encoded image data extracted from the bitstreamby using a minimum subblock size according to the reconstructed maximumpartition layer value to reconstruct a current block in step S3320.

According to yet another aspect of the present disclosure as describedabove, even when the macroblock having a size equal to or larger than asize 16×16 is split into various sizes of subblocks, a minimum subblocksize can be set by using a maximum partition layer value. Accordingly,it is not required to decode partition information for layers, which arenot used. As a result, partition information of the macroblock can beencoded with the smaller number of bits and thus the compressionefficiency can be improved.

Further, the video encoding apparatus according to yet another aspect ofthe present disclosure determines available partition layers of acurrent block, selects a partition layer, which generates a smallestencoding cost of the current block, among the available partitionlayers, generates image data encoded by performing a predictive encodingon the current block by using only the selected partition layer, and cangenerate a bitstream including encoded partition layer data created byencoding information on the selected partition layer, encoded partitioninformation data created by encoding partition information of thecurrent block based on the selected partition layer, and encoded imagedata. Here, one or more partition layers can be selected as thepartition layer generating the smallest encoding cost of the currentblock. Accordingly, the video encoding apparatus can generate encodedimage data by determining available partition layers for the currentblock, selecting one or more partition layers, which generate thesmallest encoding cost of the current block, among the availablepartition layers, and splitting and predictive-encoding the currentblock by using only the one or more selected partition layers.Therefore, the video encoding apparatus can encode macroblock partitioninformation with a smaller number of bits and thus improve thecompression efficiency.

In addition, the video decoding apparatus according to yet anotheraspect of the present disclosure can reconstruct information onpartition layers and partition information by decoding encoded partitioninformation data and encoded partition layer data extracted from thebitstream, and reconstruct the current block by performing a predictivedecoding on the encoded image data extracted from the bitstream by usingthe reconstructed information on the partition layers and thereconstructed partition information.

D) Macroblock Size Encoding and Decoding

According to the aforementioned aspects, it has been assumed that themacroblock has a prearranged size between the video encoding apparatusand the video decoding apparatus. Further, based on this assumption,then macroblock splitting method, and the partition information encodingand decoding have been described.

Hereinafter, a method of determining a size of a macroblock having avariable size, and an encoding and a decoding for signaling thedetermined macroblock size to the decoding apparatus will be described.

In general, a high resolution image may be efficiently encoded by unitof large blocks. However, the encoding efficiency is not always improvedwhenever all areas of the image are encoded using the largest blocks.For example, in a case of a monotonous image, it may be efficient toencode the image by unit of macroblocks such as a large macroblock ofsize 128×128. However, when a complex image is encoded by unit ofmacroblocks of size 128×128, most macroblocks are split into smallersubblocks and most subblocks may be predicted or transformed by unit ofblocks having a size equal to or smaller than a size 16×16. In thisevent, since partition information indicating that each macroblock hasbeen split into subblocks having a size equal to or smaller than thesize 16×16 should be encoded, it is efficient to encode the imagethrough the selection of a macroblock size, which corresponds to thesize 16×16.

According to another aspect of the present disclosure, a maximum blocksize, which can be used for the prediction or the transform to furtherimprove the efficiency of the aforementioned partition informationencoding method, is determined, the image is encoded by unit of selectedblock sizes, and the image is reconstructed by decoding the image in amaximum block size identified by information included in the bitstream.

Hereinafter, although it is not described that a maximum block size(e.g. macroblock), which can be used for the prediction, and a maximumblock size, which can be used for the transform, are separately set forthe convenience of the description, it is applicable to separately setthe maximum block size for the prediction and the maximum block size forthe transform.

Further, each of the information can be encoded in the sequence header,the picture header, the slice header, or the macroblock header.

After the macroblock size is determined according to aspects of thepresent disclosure, which will be discussed in the followingdescription, the macroblock can be split into subblocks based on themacroblock splitting method according to aforementioned aspects of thepresent disclosure. Further, the prediction or the transform can beperformed in the unit of subblocks. In this event, the video encodingapparatus according to aspects of the present disclosure encodesinformation on the macroblock size and/or partition information on themacroblock split and then can transmit the encoded information to thevideo decoding apparatus according to aspects of the present disclosure.The video decoding apparatus according to aspects of the presentdisclosure can grasp the macroblock size to be currently decoded and/orinformation on subblocks within the macroblock by decoding informationon the macroblock size and/or macroblock partition information. Asdescribed above, the partition information can be variously implemented.The partition information of the macroblock according to aspects of thepresent disclosure, which contains information on whether the macroblockis split into subblocks and/or information on subblock types split fromthe macroblock, is signaled to the video decoding apparatus according toaspects of the present disclosure.

D-1) Video Encoding Apparatus

D-1-1) Description of Encoding Apparatus

FIG. 35 is a schematic block diagram for illustrating a video encodingapparatus 3500 according to yet another aspect of the presentdisclosure.

According to an implementation of the video encoding apparatus accordingto another aspect of the present disclosure, the video encodingapparatus may include a candidate macroblock size configuration unit3510, a video encoder 3520, and a macroblock size determiner 3530.

The candidate macroblock size configuration unit 3510 configuresmacroblock size candidates, which can be used by the video encodingapparatus 3500 according to yet another embodiment of the presentdisclosure. The macroblock size candidates are input by a user ordetermined according to image characteristics. Alternatively, themacroblock size candidates may be set candidates groups (e.g. size64×64, size 32×32, and size 16×16) input by another apparatus.

In a case where the macroblock size candidates are determined accordingto image characteristics, if the image resolution is 4K×2K and a ratioof a width and a height is 16:9, the macroblock size candidates mayinclude size 128×128, size 128×64, size 64×128, size 64×64, size 64×32,size 32×64, size 32×32, size 32×16, size 16×32, and size 16×16.

The video encoder 3520 may be implemented as the video encodingapparatus according to an aspect of the present disclosure describedwith reference to FIG. 6, 8, or 26. That is, the video encoder 3520encodes an image by each macroblock size candidate configured by thecandidate macroblock size configuration unit 3510 and generates imagedata for each macroblock size. In this event, each macroblock isinternally split into subblocks (here, the subblock having a minimumsubblock size may be a block by unit of 4×4 pixels), which are smallerblocks than the macroblock, and an intra encoding or an inter encodingis performed on the split subblocks. Partition information indicatingsizes and shapes of subblocks within the macroblock may be included inthe bitstream by using the partition information encoding methodaccording to the aforementioned aspects of the present disclosure.

As another operation method of the video encoder 3520, an encoding isperformed using macroblocks of size 16×16 and size 32×32. As a result ofthe encoding, when an encoding cost in a case of using the macroblocksof size 32×32 is higher than an encoding cost in a case of using themacroblocks of size 16×16, the size 16×16 is determined as themacroblock size. When the encoding cost in the case of using themacroblocks of size 32×32 is lower than the encoding cost in the case ofusing the macroblocks of size 16×16, an encoding is performed againusing macroblocks of size 64×64 and then encoding costs of using themacroblock of size 32×32 and size 64×64 are compared in the same way.Accordingly, the macroblock size may be determined.

Further, as another operation method of the video encoder 3520, anencoding is performed using macroblocks of size 16×16, size 32×16, size16×32, and size 32×32. As a result of the encoding, a macroblock sizehaving the best encoding efficiency is selected. And then, the encodingis performed using pixel blocks generated by enlarging a width, aheight, and both the width and the height of the selected macroblock twotimes, respectively, as the macroblocks. If the encoding efficiency isnot improved using an enlarged macroblock size, the encoding is stoppedand the macroblock size is determined.

The macroblock size determiner 3530 calculates encoding costs (i.e.encoding costs of image data for each macroblock size) generated whenthe video encoder 3520 encodes the image by each macroblock size andcompares encoding costs of respective macroblock sizes to determine anoptimal macroblock size among macroblock size candidates. Here, theoptimal macroblock size may be any macroblock size if the macroblocksize generates the lowest encoding cost when the image is encoded usingthe corresponding macroblock size. However, in a case of using encodingcost, various optimal macroblock sizes may be determined using theencoding cost.

Further, when the macroblock size is determined, the macroblock sizedeterminer 3530 generates image data encoded in the correspondingmacroblock size as the bitstream. In this event, information on thedetermined macroblock size may be encoded and included in the bitstream.The information on the macroblock size may be included in the bitstreamfor an entire image only once or may be included in the bitstream inevery picture of the entire image. Further, according to another aspectof the present disclosure, the macroblock size, which corresponds to theencoding/decoding units, may be differently selected for each picture,slice or macroblock layer.

D-1-2) Macroblock Size Encoding Method

Hereinafter, various methods of encoding the macroblock size accordingto aspects of the present disclosure are described.

As described above, since the macroblock size can be calculated by usingthe minimum subblock size and the maximum partition layer (MaxLayer),the macroblock size can be obtained by encoding a determined macroblocksize value or encoding the minimum subblock size and the maximumpartition layer.

That is, in a method of encoding block size information indicating themacroblock size or the minimum subblock size and encoding the subblocksize, maximum partition layer (MaxLayer) information is together encodedand transmitted to the video decoding apparatus.

The maximum partition layer information can be encoded into a binary bitstring by using a lossless compression coding such as a binaryarithmetic coding, a Huffman coding, etc. Alternatively, the maximumpartition layer information can be encoded by using various binarycoding methods such as a unary code, a truncated unary code, anExp-Golomb code, etc.

D-1-2-1) Macroblock Size Encoding Method 1

A first method of encoding the macroblock size is first described.

A flag (Set_MBsize_flag) indicating whether to transmit information onthe macroblock size may be included in a sequence header, a header ofeach picture, or a slice header. The macroblock size may be eithertransmitted or not according to a value of the flag. In a case of nottransmitting the macroblock size, macroblocks having a predeterminedsize, for example, blocks of size 16×16 are used as macroblocks.

If macroblock size is designated, information on the macroblock size istransmitted. In this event, macroblocks having an arbitrary size, ofwhich horizontal sizes and vertical sizes are separately set, may beused. Alternatively, in a case of using square macroblocks, onlyinformation on one side of the square macroblock is encoded and then maybe transmitted to the decoding apparatus.

A macroblock size value to be encoded may be designated as an actualmacroblock size or a value indicating the number of times, by which amacroblock is to be enlarged or reduced with respect to a predeterminedsize, may be transmitted. Further, the macroblock size value may berepresented using smaller bits through applying a log function to themacroblock size value instead of directly encoding the macroblock sizevalue. For example, a value of log₂ (selected MBsize/X) (X is anypositive integer, which is a multiple of 2) is encoded. In this event, avalue of X may be selected as an available minimum macroblock size. Forexample, if the available minimum macroblock size is 8×8, it ispreferable to select “8” as the value of X. In this event, “0” isencoded when a current macroblock is a block of size 8×8, and “1” isencoded when the current macroblock is a block of size 16×16. If theavailable minimum macroblock size is 16×16, it is preferable to select“16” instead of “8” as the value of X. In this event, “0” is encodedwhen the current macroblock is a block of size 16×16, and “1” is encodedwhen the current macroblock is a block of size 32×32. Accordingly, acurrent macroblock size can be represented using bits smaller than bitsused for encoding a large number such as 8, 16, or 32.

Further, magnifications of the horizontal size and the vertical size maybe encoded, respectively.

Alternatively, the macroblock size value may be an index value of aprearranged table between the video encoding apparatus and the videodecoding apparatus.

In this event, the macroblock size to be transmitted can be encodedusing various binary coding methods such as a unary code, a truncatedunary code, an Exp-Golomb code, etc.

Hereinafter, it is not described to separately set a horizontal size anda vertical size for the convenience of the description, but it isapplicable to separately set the horizontal size and the vertical size.Further, although it is exemplified to encode data on a sequence headerand a picture header, the data may be encoded on a slice header or amacroblock header.

An example of a syntax according to the first method of encoding themacroblock size is as follows.

  Set_MBsize_Flag if(Set_MBsize_Flag == 1) { MBsize } Or Set_MBsize_Flagif(Set_MBsize_Flag == 1) { MBsize_width MBsize_height }

Further, block size information such as MB_size, which indicates themacroblock size, can be encoded through the minimum subblock size andthe maximum partition layer.

Here, a minimum subblock size value to be encoded may be designated asan actual minimum subblock size or a value indicating the number oftimes, by which a subblock is to be enlarged or reduced with respect toa predetermined size, may be transmitted. Further, the minimum subblocksize value may be represented using smaller bits through applying a logfunction to the minimum subblock size value instead of directly encodingthe minimum subblock size value. For example, a value of log₂(minblockSize/X) (X is any positive integer, which is a multiple of 2)is encoded. In this event, a value of X may be selected as an availableminimum subblock size. For example, if the available minimum subblocksize is 4×4, it is preferable to select “4” as the value of X. In thisevent, “0” is encoded when a minimum subblock to be encoded according toa current macroblock size is a block of size 4×4, and “1” is encodedwhen the minimum subblock is a block of size 8×8. If the availableminimum macroblock size is 8×8, it is preferable to select “8” insteadof “4” as the value of X. In this event, “0” is encoded when theavailable minimum subblock size according to the current macroblock sizeis 8×8, and “1” is encoded when the minimum subblock size is 16×16.

Further, magnifications of the horizontal size and the vertical size maybe encoded, respectively.

Alternatively, the minimum subblock size value may be an index value ofa table defining a prearranged block size between the video encodingapparatus and the video decoding apparatus.

In this event, the minimum subblock size can be encoded using variousbinary coding methods such as a unary code, a truncated unary code, anExp-Golomb code, etc.

The maximum partition layer information can be encoded into a binary bitstring by using a lossless compression coding such as a binaryarithmetic coding, a Huffman coding, etc. Alternatively, the maximumpartition layer information can be encoded by using various binarycoding methods such as a unary code, a truncated unary code, anExp-Golomb code, etc.

When the macroblock size is encoded by using the minimum subblock sizeand the maximum partition layer, an example of the aforementioned firstsyntax can be represented as follows.

  Set_MBsize_Flag if(Set_MBsize_Flag == 1) { minBlockSize MaxLayer } OrSet_MBsize_Flag if(Set_MBsize_Flag == 1) { minBlockSize_widthminBlockSize _height MaxLayer }

Alternatively, the macroblock size may be transmitted to the videodecoding apparatus in every sequence, picture, slice, or macroblockheader without encoding the flag (Set_MBsize_flag) indicating whether totransmit information on the macroblock size.

D-1-2-2) Macroblock Size Encoding Method 2

Hereinafter, a second method of encoding the macroblock size isdescribed.

According to the second method, a size M×N is set as a referencemacroblock size, and a flag indicating whether to use the referencemacroblock size is encoded in every picture, slice, or macroblockheader. When the reference macroblock size is not used, a selectedmacroblock size is encoded. Alternatively, after a flag indicatingwhether to set the reference macroblock size is encoded in the sequenceheader, a predetermined size, for example, a size 16×16 is used as thereference macroblock size if the reference macroblock size is not set,and the reference macroblock size may be encoded and included in thesequence header if the reference macroblock size is set.

Here, in a method of encoding a value of default_MBsize, which isinformation indicating the reference macroblock size, or a value ofMB_size, which is information indicating a current macroblock size, anactual macroblock size may be designated or a value indicating thenumber of times, by which a macroblock is to be enlarged or reduced withrespect to a predetermined size, may be transmitted. Alternatively, asdescribed in the aforementioned first method, the macroblock size valuemay be represented using smaller bits through applying a log function tothe macroblock size value instead of directly encoding the macroblocksize value.

Further, magnifications of the horizontal size and the vertical size maybe encoded, respectively.

Alternatively, the macroblock size value may be an index value of aprearranged table between the video encoding apparatus and the videodecoding apparatus.

In this event, the macroblock size to be transmitted may be encodedusing various binary coding methods such as a unary code, a truncatedunary code, an Exp-Golomb code, etc.

An example of a syntax according to the aforementioned second method ofencoding the macroblock size is represented as follows.

  Sequence, picture, or slice header Set_defaultMBsize_Flagif(Set_MBsize_Flag == 1) { defalt_MBsize } Picture, slice, or macroblockheader use_defalt_MBsize_flag if(use_defalt_MBsize_flag == 0) { MB_size}

In addition, block size information such as default_MBsize forindicating a default or reference macroblock size and MB_size forindicating a macroblock size may be encoded through the minimum subblocksize and maximum partition layer.

In a method of encoding reference minimum subblock sizedefault_minBlockSize for indicating the reference macroblock size orminimum subblock size minBlockSize for indicating information on thecurrent macroblock size, a minimum subblock size to be actually encodedmay be designated and a value indicating the number of times, by which asubblock is to be enlarged or reduced from a predetermined size, may betransmitted. Alternatively, as described in the aforementioned firstmethod, the minimum subblock size value may be represented using smallerbits through applying a log function to the minimum subblock size valueinstead of directly encoding the minimum subblock size value.

Further, magnifications of the horizontal size and the vertical size maybe encoded, respectively.

Alternatively, the minimum subblock size value may be an index value ofa prearranged table between the video encoding apparatus and the videodecoding apparatus.

In this event, the minimum subblock size to be transmitted may beencoded using various binary coding methods such as a unary code, atruncated unary code, Exp-Golomb code, etc.

The maximum partition layer information can be encoded into a binary bitstring by using a lossless compression coding such as a binaryarithmetic coding, a Huffman coding, etc. Alternatively, the maximumpartition layer information can be encoded by using various binarycoding methods such as a unary code, a truncated unary code, anExp-Golomb code, etc.

When the macroblock size is encoded by using the minimum subblock sizeand the maximum partition layer, an example of the aforementioned secondsyntax can be represented as follows.

  Sequence, picture, or slice header Set_defaultMBsize_Flagif(Set_MBsize_Flag == 1) { default_minBlockSize default_MaxLayer }Picture, slice, or macroblock header  

use_default_MBsize_flag if(use_default_MBsize_flag == 0) { minBlockSizeMaxLayer } D-1-2-3) Macroblock Size Encoding Method 3

Hereinafter, a third method of encoding the macroblock size isdescribed.

According to the third method, a size M×N is set as the referencemacroblock size, and a flag indicating whether to use the referencemacroblock size is encoded in every header of each picture, sliceheader, or minimum subblock header and transmitted to the video decodingapparatus. When the flag indicates that the reference macroblock size isused, a block having the same size as the reference macroblock size isselected as a current macroblock. However, when the flag indicates thatthe reference macroblock size is not used, a block having a sizeenlarged or reduced by a predetermined ratio with respect to thereference macroblock size is selected as the current macroblock in anencoding or a decoding process. For example, a block having a horizontalsize and a vertical size twice as large or twice as small as thehorizontal size and the vertical size of the reference macroblock may beselected as the current macroblock.

When there are various enlarging or reducing ratios, various ratios maybe represented by making a length of the flag larger than 2 bits.Alternatively, information indicating the enlarging ratio or thereducing ratio may be additionally encoded in addition to the flagindicating whether to use the reference macroblock size.

When the flag indicates that the reference macroblock size is not usedand a block having a size enlarged from the reference macroblock size isselected as the current macroblock, the reference macroblock sizecorresponds to a minimum macroblock size available for the currentbitstream encoding or decoding. On the contrary, when the flag indicatesthat the reference macroblock size is not used and a block having a sizereduced with respect to the reference macroblock size is selected as thecurrent macroblock, the reference macroblock size corresponds to aminimum macroblock size available for the current bitstream encoding ordecoding.

The video decoding apparatus can select the current macroblock size byusing the flag indicating whether to use the reference macroblock sizeand/or additional information indicating an enlargement or a reductionby a predetermined ratio with respect to the reference macroblock size.

According to an aspect of the present disclosure, the flag indicatingwhether to set the reference macroblock size may be included in thesequence header. If the reference macroblock size is not set, it may beprearranged to use a predetermined size, for example, a size 16×16 asthe reference macroblock size.

When the reference macroblock size is set and signaled to the videodecoding apparatus, information on the reference macroblock size isencoded and may be included in the sequence header. According to anaspect of the present disclosure, the video encoding apparatus cansignal information indicating the maximum macroblock size available forthe current bitstream encoding or decoding to the video decodingapparatus as the information on the reference macroblock size. Accordingto another aspect of the present disclosure, the video encodingapparatus can signal information indicating the minimum macroblockavailable for the current bitstream encoding or decoding to the videodecoding apparatus as the information on the reference macroblock size.According to yet another aspect of the present disclosure, the videoencoding apparatus can signal information on both the maximum macroblockand the minimum macroblock size available for the current bitstreamencoding or decoding to the video decoding apparatus as the informationon the reference macroblock size.

In a method of encoding default_MBSize, which is the information on thereference macroblock size, the actual macroblock size may be designatedand a value indicating the number of times, by which a macroblock is tobe enlarged or reduced from a predetermined size, may be transmitted.Alternatively, as described in the aforementioned first method, themacroblock size value may be represented using smaller bits throughapplying a log function to the macroblock size value instead of encodingdirectly the macroblock size value.

More specifically, for example, when default_MBSize indicates themaximum macroblock size available for the current bitstream encoding ordecoding, a value of log₂ (X/default_MBSize) (X is any positive integer,which is a multiple of 2) is encoded. In this event, an availablemaximum macroblock size may be selected as a value of X. Alternatively,when default_MBSize indicates the minimum macroblock size available forthe current bitstream encoding or decoding, a value of log₂(default_MBSize/X) (X is any positive integer, which is a multiple of 2)is encoded. In this event, an available minimum macroblock size may beselected as the value of X.

Further, magnifications of the horizontal size and the vertical size maybe encoded, respectively.

Alternatively, the macroblock size value may be an index value of aprearranged table between the video encoding apparatus and the videodecoding apparatus.

In this event, the macroblock size to be transmitted may be encodedusing various binary coding methods such as a unary code, a truncatedunary code, Exp-Golomb code, etc.

In addition, block size information such as default_MBsize indicatingthe reference macroblock size and MB_size indicating the macroblock sizecan be encoded through the minimum subblock size and the maximumpartition layer.

In a method of encoding default_minBlockSize, which is information onthe reference minimum subblock size, a minimum subblock size to beactually encoded may be designated and a value indicating the number oftimes, by which a subblock is to be enlarged or reduced from apredetermined size, may be transmitted. Alternatively, as described inthe aforementioned first method, the minimum subblock size value may berepresented using smaller bits through applying a log function to theminimum subblock size value instead of encoding directly the minimumsubblock size value.

More specifically, for example, when default_minBlockSize indicates themaximum subblock size according to the maximum macroblock size availablefor the current bitstream encoding or decoding, a value of log₂(X/default_minBlockSize) (X is any positive integer, which is a multipleof 2) is encoded. In this event, an available maximum subblock size maybe selected as a value of X. Alternatively, when default_minBlockSizeindicates the minimum subblock size according to the minimum macroblocksize available for the current bitstream encoding or decoding, a valueof log₂ (default_minBlockSize/X) (X is any positive integer, which is amultiple of 2) is encoded. In this event, an available minimum subblocksize may be selected as the value of X.

Further, magnifications of the horizontal size and the vertical size maybe encoded, respectively.

Alternatively, the reference minimum subblock size may be an index valueof a prearranged table between the video encoding apparatus and thevideo decoding apparatus.

In this event, the reference minimum subblock size may be encoded usingvarious binary coding methods such as a unary code, a truncated unarycode, Exp-Golomb code, etc.

The maximum partition layer information can be encoded into a binary bitstring by using a lossless compression coding such as a binaryarithmetic coding, a Huffman coding, etc. Alternatively, the maximumpartition layer information can be encoded by using various binarycoding methods such as a unary code, a truncated unary code, anExp-Golomb code, etc.

D-1-2-4) Macroblock Size Encoding Method 4

Hereinafter, a fourth method of encoding the macroblock size isdescribed.

According to the fourth method, after a flag indicating whether to usethe reference macroblock size and a macroblock size selected in a casewhere the reference macroblock size is not used are encoded in a firstpicture, a flag indicating whether to use a macroblock size of aprevious picture and a macroblock size of a current picture in a casewhere the macroblock size of the previous picture is not used may beencoded from a second picture.

In a method of encoding default_MB size, which is the informationindicating the reference macroblock size or MB_size, which is theinformation indicating the current macroblock size, an actual macroblocksize may be designated and a value indicating the number of times, bywhich a macroblock is to be enlarged or reduced from a predeterminedsize, may be transmitted. Alternatively, as described in theaforementioned first method, macroblock size values can be representedusing smaller bits through applying a log function to the macroblocksize values instead of directly encoding the macroblock size values.

Further, magnifications of the horizontal size and the vertical size maybe encoded, respectively. Alternatively, the size values of macroblocksto be encoded may be index values of a table prearranged between thevideo encoding apparatus and the video decoding.

In this event, the macroblock size to be transmitted may be encodedusing various binary coding methods such as a unary code, a truncatedunary code, an Exp-Golomb code, etc.

An example of a syntax according to the aforementioned fourth method ofencoding the macroblock size is represented as follows.

  First picture use_default_MBsize_flag if(use_default_MBsize_flag == 0){ MB_size } From second picture use_prevPic_MBsize_flagif(use_prevPic_MBsize_flag == 0) { MB_size }

Further, block size information such as MBsize indicating the macroblocksize can be encoded through the minimum subblock size and the maximumpartition layer.

A minimum subblock size to be actually encoded may be designated and avalue indicating the number of times, by which a subblock is to beenlarged or reduced from a predetermined size, may be transmitted.Alternatively, as described in the aforementioned first method, a logfunction may be applied to the minimum subblock size value instead ofdirectly encoding the minimum subblock size value.

Further, magnifications of the horizontal size and the vertical size maybe encoded, respectively. Alternatively, the minimum subblock size maybe an index value of a prearranged table between the video encodingapparatus and the video decoding apparatus.

In this event, the reference minimum subblock size may be encoded usingvarious binary coding methods such as a unary code, a truncated unarycode, Exp-Golomb code, etc.

The maximum partition layer information can be encoded into a binary bitstring by using a lossless compression coding such as a binaryarithmetic coding, a Huffman coding, etc. Alternatively, the maximumpartition layer information can be encoded by using various binarycoding methods such as a unary code, a truncated unary code, anExp-Golomb code, etc.

When the reference macroblock size or the macroblock size is encoded byusing the minimum subblock size and the maximum partition layer, anexample of the aforementioned fourth syntax can be represented asfollows.

  First picture use_defalt_MBsize_flag if(use_defalt_MBsize_flag == 0) {minBlockSize MaxLayer } From second picture use_prevPic_MBsize_flagif(use_prevPic_MBsize_flag == 0) { minBlockSize MaxLayer } D-1-2-5)Macroblock size encoding method 5

Hereinafter, a fifth method of encoding macroblock sizes will bedescribed.

According to the fifth method, different macroblock sizes are used foran intra picture and an inter picture. That is, a macroblock size forthe intra picture and a macroblock size for the inter picture areencoded in the sequence header. Alternatively, each macroblock sizeaccording to a picture type can be encoded only in headers of a firstintra picture and a first inter picture. A method of encodinginformation on the macroblock size of the intra picture and themacroblock size of the inter picture may be used in combination with theaforementioned methods.

  Sequence header Set_intraMBsize_Flag Set_interMBsize_Flagif(Set_interMBsize_Flag == 1) { intraMBsize } if(Set_interMBsize_Flag== 1) { interMBsize }

Further, information on the intra macroblock size or the intermacroblock size can be encoded through the minimum subblock size and themaximum partition layer.

When the intra macroblock size or the inter macroblock size is encodedby using the minimum subblock size and the maximum partition layer, anexample of the aforementioned fifth syntax can be represented asfollows.

  Sequence header Set_intraMBsize_Flag Set_interMBsize_Flagif(Set_intraMBsize_Flag == 1) { Intra_minBlockSize Intra_MaxLayer }if(Set_interMBsize_Flag == 1) { Inter_minBlockSize Inter_MaxLayer }D-1-3) Description of Encoding Method Order

FIG. 36 is a flowchart for illustrating an implementation of a videoencoding method according to another aspect of the present disclosure.

The video encoding apparatus configures macroblock size candidates instep S3610, encodes an input image by each macroblock size candidate instep S3620, determines a macroblock size based on encoding costs foreach macroblock size candidate in step S3630, and generates a bitstreamincluding image data encoded in the determined macroblock size andinformation on the determined macroblock size in step S3640. Since ithas been described through FIG. 35 that the video encoding apparatusconfigures macroblock size candidates, encodes an image for eachmacroblock size candidate, and determines a macroblock size based onencoding costs of encoded image data for each macroblock size candidate,its detailed description is omitted.

D-2) Video Decoding Apparatus

D-2-1) Description of Decoding Apparatus

FIG. 37 is a block diagram for illustrating an implementation of a videodecoding apparatus according to another aspect of the presentdisclosure.

According to the implementation of the video decoding apparatusaccording to another aspect of the present disclosure, the videodecoding apparatus 3700 may include a macroblock size configuration unit3710 and a video decoder 3720.

The macroblock size configuration unit 3710 extracts information on amacroblock size from the bitstream before performing a decoding by unitof macroblocks and configures a macroblock size by using the extractedinformation.

When it is prearranged between the video encoding apparatus and thevideo decoding apparatus that the information on the macroblock size isincluded in the bitstream only once, an image can be reconstructed bydecoding the information into the bitstream for an entire image onlyonce and using the extracted macroblock size in the entire imagedecoding. When it is prearranged that the macroblock size isencoded/decoded in every picture, the image can be reconstructed byextracting the macroblock size from the bitstream in every picture andusing different macroblock sizes in every picture. Further, according toanother aspect of the present disclosure, the image can be reconstructedby extracting the macroblock size in every picture, slice, or macroblocklayer and using the selected macroblock size.

The video decoder 3720 may be implemented as the video decodingapparatus according to an aspect of the present disclosure describedwith reference to FIG. 32, and sizes and shapes of subblocks split forthe prediction or the transform within the macroblock are reconstructedby decoding partition information according to the reconstructedmacroblock size through methods according to the aforementioned aspects.Respective subblocks are reconstructed by extracting and decodingencoded image data of the respective subblocks from the bitstream.

D-2-2) Macroblock Size Information Decoding Method

Hereinafter, various methods of encoding the macroblock size accordingto aspects of the present disclosure are described.

D-2-2-1) Macroblock Size Information Decoding Method 1

A decoding method according to the first method of encoding themacroblock size is first described.

A flag (Set_MBsize_flag) indicating whether to transmit information onthe macroblock size may be included, the flag (Set_MBsize_flag)indicating whether to transmit information on the macroblock size isentropy-decoded in a prearranged position such as the sequence header,the header of each picture, or the slice header. When the decoded flaghas a value indicating that the macroblock size is not transmitted, amacroblock having a predetermined size prearranged between the videoencoding apparatus and the video decoding apparatus, for example, a16×16 block is used as the macroblock.

When the decoded macroblock size designating flag (Set_MBsize_flag)indicates that the macroblock size is designated, the macroblock size isentropy-decoded and extracted through a method prearranged between thevideo encoding apparatus and the video decoding apparatus among variousentropy decoding methods such as a unary code, a truncated unary-code,an Exp-Golomb code, etc.

When a horizontal size and a vertical size of the macroblock areseparately set and then transmitted, the horizontal size and thevertical size may be obtained by entropy-decoding each of the sizes.Alternatively, if a square macroblock is used, only informationindicating one side of the square macroblock may be entropy decoded.

A decoded value may be designated as the actual macroblock size, and avalue indicating the number of times, by which a macroblock is to beenlarged or reduced from a predetermined size, may be transmitted.Further, when the video encoding apparatus encodes a value generated byapplying a log function to the macroblock size value, the macroblocksize may be set by applying an exponential function to theentropy-decoded value. For example, when the video encoding apparatusencodes y, which is a value of log₂ (MBsize selected in the encoder/X)(X is any positive integer, which is a multiple of 2), the videodecoding apparatus entropy-decodes y and can obtain the macroblock sizeselected in the encoder by multiplying 2^(y) and X. Here, X correspondsto a prearranged value between the video encoding apparatus and thevideo decoding apparatus or a value extracted from the bitstream beforea macroblock size decoding. When a minimum macroblock size available forX is selected and used and the available minimum macroblock size is 8×8,the macroblock size is set to 8×8 if a decoded value of y is “0”, andthe macroblock size is set to 16×16 if the decoded value of y is ‘1”.When the available minimum macroblock size is 16×16, “16” instead of “8”is used as X, and the macroblock size is set to 16×16 if the decodedvalue of y is “0”.

Further, when the video encoding apparatus decodes magnifications of thehorizontal size and the vertical size, respectively, the macroblock sizemay be obtained by entropy-decoding the magnifications of the horizontalsize and the vertical size, respectively.

In addition, when an index value of a prearranged table between thevideo encoding apparatus and the video decoding apparatus is encoded,the macroblock size may be obtained by using a decoded value as theindex value of the table.

In this event, the macroblock size to be transmitted may be decodedusing various binary coding methods such as a unary code, a truncatedunary code, an Exp-Golomb code, etc. Hereinafter, it is not described toseparately decode and extract the horizontal size and the vertical sizefor the convenience of descriptions, but it is applicable to separatelyextract the horizontal size and the vertical size. Further, although itis exemplified to decode data on the sequence header and the pictureheader, the macroblock size may be decoded on a slice header or amacroblock header when the video encoding apparatus encodes themacroblock size in the slice header or the macroblock header.

When it is prearranged between the video encoding apparatus and thevideo decoding apparatus that the minimum subblock size and the maximumpartition layer are used as information on the macroblock size,information on the minimum subblock size and the maximum partition layeris extracted and decoded from the bitstream, and then the macroblocksize can be reconstructed.

When the decoded macroblock size designating flag (Set_MBsize_flag)indicates that the macroblock size is designated, the minimum subblocksize is entropy-decoded and extracted through a prearranged methodbetween the video encoding apparatus and the video decoding apparatusamong various entropy decoding methods such as a unary code, a truncatedunary-code, an Exp-Golomb code, etc.

When the horizontal size and the vertical size of the minimum subblocksize are separately set and then transmitted, the horizontal size andthe vertical size may be obtained by entropy-decoding each of the sizes.Alternatively, if a square macroblock is used, only informationindicating one side of the square macroblock may be entropy-decoded.

A decoded value may be designated as the actual minimum subblock size,and a value indicating the number of times, by which a subblock is to beenlarged or reduced from a predetermined size, may be transmitted.Further, when the video encoding apparatus encodes a value generated byapplying a log function to the minimum subblock size value, the minimumsubblock size may be set by applying an exponential function to theentropy-decoded value. For example, when the video encoding apparatusencodes y, which is a value of log₂ (minBlockSize selected in the videoencoding apparatus according to the selected macroblock size/X) (X isany positive integer, which is a multiple of 2), the video decodingapparatus entropy-decodes y and can obtain the minimum subblock sizeaccording to the macroblock size selected in the video encodingapparatus by multiplying 2^(y) and X. Here, X corresponds to aprearranged value between the video encoding apparatus and the videodecoding apparatus or a value extracted from the bitstream before aminimum subblock size decoding. When a minimum subblock size availablefor X is selected and used and the available minimum subblock size is4×4, the minimum subblock size is set to 4×4 if a decoded value of y is“0”, and the minimum subblock size is set to 8×8 if the decoded value ofy is ‘1”. When the available minimum subblock size is 8×8, “8” insteadof “4” is used as X, and the minimum subblock size is set to 8×8 if thedecoded value of y is “0”.

Further, when the video encoding apparatus decodes magnifications of thehorizontal size and the vertical size, respectively, the minimumsubblock size may be obtained by entropy-decoding the magnifications ofthe horizontal size and the vertical size, respectively.

In addition, when an index value of a prearranged table between thevideo encoding apparatus and the video decoding apparatus is encoded,the minimum subblock size may be obtained by using a decoded value asthe index value of the table.

In this event, the minimum subblock size may be decoded using variousbinary coding methods such as a unary code, a truncated unary code, anExp-Golomb code, etc.

The maximum partition layer information is decoded by using losslesscompression coding such as a binary arithmetic coding, a Huffman coding,etc., and can be decoded by using various methods such as a unary code,a truncated unary code, an Exp-Golomb code, etc.

When the reconstructed minimum subblock size is N×N and the maximumpartition layer is x, the macroblock size is (N×2^(x))×(N×2^(x)).

E-2-2-2) Macroblock Size Information Decoding Method 2

Hereinafter, a decoding method according to the second method ofencoding the macroblock size is described.

According to the second method, a prearranged size M×N between the videoencoding apparatus and the video decoding apparatus is set as thereference macroblock size, and a flag indicating whether to use thereference macroblock size is entropy-decoded from a header of eachpicture, a slice header, and a macroblock header. When a value of thedecoded flag indicates that the reference macroblock size is not used,information related to the macroblock is extracted by entropy-decodingmacroblock size information, and the macroblock size is set. When thevalue of the decoded flag indicates that the reference macroblock sizeis used, it means that the macroblock size information is not includedin the bitstream, so that a preset reference macroblock size is set asthe macroblock size and a series of decoding processes are performed.

When the reference macroblock size is included in the sequence headerand transmitted to the video decoding apparatus from the video encodingapparatus, the reference macroblock size may be extracted from aprearranged position such as the sequence header, etc. within thebitstream. Here, the reference macroblock size or the current macroblocksize is allocated an entropy-decoded value, and the macroblock size maybe obtained by scaling (enlarging or reducing) a predetermined size bythe entropy-decoded value. Alternatively, as described in theaforementioned first decoding method, when the video encoding apparatusencodes a value generated by applying a log function to the macroblocksize value, the macroblock size value may be obtained by using anexponential function.

Further, when the video encoding apparatus decodes magnifications of thehorizontal size and the vertical size, respectively, the macroblock sizecan be obtained by entropy-decoding the magnifications of the horizontalsize and the vertical size, respectively.

In addition, when an index value of a prearranged table between thevideo encoding apparatus and the video decoding apparatus is encoded,the macroblock size can be obtained by using a decoded value as theindex value of the table.

In this event, the macroblock size to be transmitted can be decodedusing various binary coding methods such as a unary code, a truncatedunary code, an Exp-Golomb code, etc.

Further, when information on the reference macroblock size or themacroblock size corresponds to information on the minimum subblock sizeand the maximum partition layer, information on a reference minimumsubblock size according to the reference macroblock size or the minimumsubblock size according to the macroblock size and information on themaximum partition layer are extracted and decoded from the bitstream,and then the macroblock size is decoded.

Here, the reference minimum subblock size and the minimum subblock sizecan be extracted from a prearranged position such as a sequence withinthe bitstream. The reference minimum subblock size and the currentminimum subblock size can be is allocated an entropy-decoded value, andthe minimum subblock size may be obtained by scaling (enlarging orreducing) a predetermined size by the entropy-decoded value.Alternatively, as described in the aforementioned first decoding method,when the video encoding apparatus encodes a value generated by applyinga log function to the minimum subblock size value, the minimum subblocksize value may be obtained by using an exponential function.

Further, when the video encoding apparatus decodes magnifications of thehorizontal size and the vertical size, respectively, the minimumsubblock size can be obtained by entropy-decoding the magnifications ofthe horizontal size and the vertical size, respectively.

In addition, when an index value of a prearranged table between thevideo encoding apparatus and the video decoding apparatus is encoded,the minimum subblock size can be obtained by using a decoded value asthe index value of the table.

In this event, the minimum subblock size can be decoded using variousbinary coding methods such as a unary code, a truncated unary code, anExp-Golomb code, etc.

The maximum partition layer information can be decoded by using alossless compression coding such as a binary arithmetic coding, aHuffman coding, etc, and various binary coding methods such as a unarycode, a truncated unary code, an Exp-Golomb code, etc.

When the reconstructed minimum subblock size is N×N and the maximumpartition layer is x, the macroblock size is (N×2^(x))×(N×2^(x)).

D-2-2-3) Macroblock Size Information Decoding Method 3

Hereinafter, a decoding method according to the third method of encodingthe macroblock size is described.

According to the third method, the video decoding apparatus extracts aflag indicating whether to use the reference macroblock size and/oradditional information indicating an enlargement or a reduction by apredetermined ratio with respect to the reference macroblock size fromthe bitstream, and then the macroblock size may be extracted using theabove information.

First, a size N×N is set as the reference macroblock size and the flagindicating whether to use the reference macroblock size is decoded inevery header of each picture, slice header, and macroblock header. Whenthe flag indicates that the reference macroblock size is used, thecurrent macroblock size is equally set to the reference macroblock sizeand a decoding is performed using the set macroblock size in the unit ofmacroblocks. However, when the flag indicates that the referencemacroblock size is not used, a value enlarged or reduced with respect tothe reference macroblock size by a predetermined ratio prearrangedbetween the video encoding apparatus and the video decoding apparatus isset as the current macroblock size and a decoding is performed in theunit of macroblocks. For example, a size enlarged or reduced twice fromthe horizontal size and the vertical size of the reference macroblockmay be set as the current macroblock size.

When the video encoding apparatus uses various enlarging or reducingratios, includes a selected ratio in the bitstream, and encodes thebitstream, the video decoding apparatus can obtain various ratios bydecoding the number of bits prearranged between the video encodingapparatus and the video decoding apparatus from the bitstream in a flagentropy decoding.

Alternatively, when information indicating an enlarging ratio or areducing ratio is included in the bitstream and encoded in addition tothe flag indicating whether to use the reference macroblock size, theenlarging ratio or the reducing ratio may be either decoded or notaccording to a value of the flag indicating whether to use the referencemacroblock size after the flag is decoded. If the enlarging ratio or thereducing ratio is not decoded, the reference macroblock size is set asthe current macroblock size and then decoding processes are performed.

When the decoded flag indicates that the reference macroblock size isdifferent from the current macroblock size and the decoded ratio is theenlarging ratio, the reference macroblock size is set as the minimummacroblock size available for the current bitstream encoding ordecoding, and then a size enlarged from the reference macroblock size bythe entropy decoded ratio is set as the current macroblock size. On thecontrary, when the entropy-decoded ratio is the reducing ratio, thereference macroblock size is set as the maximum macroblock sizeavailable for the current bitstream encoding or decoding, and then asize reduced with respect to the reference macroblock size by theentropy-decoded ratio is set as the current macroblock size.

According to an embodiment of the present disclosure, when a flagindicating whether to set the reference macroblock size is included inthe sequence header of the bitstream and then transmitted, the decoderentropy-decodes the flag from the sequence header. And then, when theflag indicates that the reference macroblock size is set, the decoderextracts reference macroblock size information from a prearrangedposition such as the sequence header of the bitstream and sets thereference macroblock size by using the extracted information. When theflag indicates that the reference macroblock size is not set, apredetermined size prearranged between the video encoding apparatus andthe video decoding apparatus, for example, a size 16×16 may be used asthe reference macroblock size.

According to an embodiment of the present disclosure, the video decodingapparatus extracts information indicating the maximum macroblock sizeavailable for the current bitstream encoding or decoding from thebitstream and can use the extracted information in setting the referencemacroblock size. According to another embodiment of the presentdisclosure, the video decoding apparatus extracts information indicatingthe minimum macroblock size available for the current bitstream encodingor decoding from the bitstream and can use the extracted information insetting the reference macroblock size. According to yet anotherembodiment of the present disclosure, the video decoding apparatusextracts information indicating both the maximum macroblock size and theminimum macroblock size available for the current bitstream encoding ordecoding from the bitstream and can use the extracted information insetting the reference macroblock size.

In a method of decoding default_MBsize, which is the informationindicating the reference macroblock size, an entropy-decoded valueitself can be set as a reference macroblock size value, and thereference macroblock size can be obtained through an enlargement or areduction from a predetermined size by using the entropy-decoded valueas an enlarging ratio or a reducing ratio. Alternatively, as describedin the aforementioned first decoding method, when the video encodingapparatus encodes a value generated by applying a log function to themacroblock size value, the macroblock size value may be obtained usingan exponential function.

More specifically, for example, when default_MBsize indicates themaximum macroblock size available for the current bitstream encoding ordecoding and the video encoding apparatus encodes y, which is a value oflog₂ (X/default_MBsize) (X is any positive integer, which is a multipleof 2), the video decoding apparatus can obtain default_MBsize byentropy-decoding y and multiplying X and 2^(y). In this event, X may bea value prearranged between the video encoding apparatus and the videodecoding apparatus like the available maximum macroblock size or a valueextracted from the bitstream before decoding default_MBsize.

Alternatively, when default_MBsize indicates the minimum macroblock sizeavailable for the current bitstream encoding or decoding and the videoencoding apparatus encodes y, which is a value of log₂(X/default_MBsize) (X is any positive integer, which is a multiple of2), the video decoding apparatus extracts y from the bitstream throughan entropy decoding. And then, the video decoding apparatus sets a valuegenerated by multiplying X and 2^(y) as default_MBsize. In this event, Xmay be a value prearranged between the video encoding apparatus and thevideo decoding apparatus like the available minimum macroblock size or avalue extracted from the bitstream before decoding default_MBsize.

Further, when the video encoding apparatus decodes magnifications of thehorizontal size and the vertical size, respectively, the referencemacroblock size can be obtained by entropy-decoding the magnificationsof the horizontal size and the vertical size, respectively.

In addition, when an index value of a prearranged table between thevideo encoding apparatus and the video decoding apparatus is encoded,the reference macroblock size can be obtained by using a decoded valueas the index value of the table.

In this event, the reference macroblock size can be decoded usingvarious binary coding methods such as a unary code, a truncated unarycode, an Exp-Golomb code, etc.

Further, when information on the reference macroblock size or themacroblock size corresponds to information on the minimum subblock sizeand the maximum partition layer, information on a reference minimumsubblock size according to the reference macroblock size or the minimumsubblock size according to the macroblock size and information on themaximum partition layer are extracted and decoded from the bitstream,and then the macroblock size is decoded.

In a method of decoding default_minBlockSize, which is the informationindicating the reference minimum subblock size, an entropy decoded valueitself can be set as a reference minimum subblock size value and thereference minimum subblock size can be obtained through an enlargementor a reduction from a predetermined size by using the entropy-decodedvalue as an enlarging ratio or a reducing ratio. Alternatively, asdescribed in the aforementioned first decoding method, when the videoencoding apparatus encodes a value generated by applying a log functionto the minimum subblock size value, the minimum subblock size value maybe obtained using an exponential function.

More specifically, for example, when default_minBlockSize indicates themaximal minimum subblock size available for the current bitstreamencoding or decoding and the video encoding apparatus encodes y, whichis a value of log₂ (X/default_minBlockSize) (X is any positive integer,which is a multiple of 2), the video decoding apparatus can obtaindefault_minBlockSize by entropy-decoding y and multiplying X and 2^(y).In this event, X may be a prearranged value between the video encodingapparatus and the video decoding apparatus like the available maximalminimum subblock size or a value extracted from the bitstream beforedecoding default_minBlockSize.

Alternatively, when default_minBlockSize indicates the minimal minimumsubblock size available for the current bitstream encoding or decodingand the video encoding apparatus encodes y, which is a value of log 2(X/default_minBlockSize) (X is any positive integer, which is a multipleof 2), the video decoding apparatus entropy-decodes and extracts y fromthe bitstream through an entropy decoding. And then, the video decodingapparatus sets a value generated by multiplying X and 2^(y) asdefault_minBlockSize. In this event, X may be a prearranged valuebetween the video encoding apparatus and the video decoding apparatuslike the available minimal minimum subblock size or a value extractedfrom the bitstream before decoding default_minBlockSize.

Further, when the video encoding apparatus decodes magnifications of thehorizontal size and the vertical size, respectively, the referenceminimum subblock size can be obtained by entropy-decoding themagnifications of the horizontal size and the vertical size,respectively.

In addition, when an index value of a prearranged table between thevideo encoding apparatus and the video decoding apparatus is encoded,the reference minimum subblock size can be obtained by using a decodedvalue as the index value of the table.

In this event, the reference minimum subblock size can be decoded usingvarious binary coding methods such as a unary code, a truncated unarycode, an Exp-Golomb code, etc.

The maximum partition layer information can be decoded by using alossless compression coding such as a binary arithmetic coding, aHuffman coding, etc., and various methods such as a unary code, atruncated unary code, an Exp-Golomb code, etc.

When the reconstructed minimum subblock size is N×N and the maximumpartition layer is x, the macroblock size is (N×2^(x))×(N×2^(x)).

D-2-2-4) Macroblock Size Information Decoding Method 4

Hereinafter, a decoding method according to the fourth method ofencoding the macroblock size is described.

According to the fourth method, after a flag indicating whether to usethe reference macroblock size and a macroblock size selected in a casewhere the reference macroblock size is not used are encoded in a firstpicture, a flag indicating whether to use a macroblock size of aprevious picture and a macroblock size of a current picture in a casewhere the macroblock size of the previous picture is not used may beencoded from a second picture.

When the flag indicating whether to use the reference macroblock sizeindicates that the reference macroblock size is used, the macroblocksize is equally set to the reference macroblock size and then a firstpicture decoding is started.

From a second picture, a flag indicating whether to use a macroblocksize of a previous picture as a macroblock size of a current picture isdecoded and then macroblock size information for a current picturedecoding is decoded when the macroblock size of the previous picture isnot used. When the macroblock size of the previous picture is used forthe current picture decoding, a macroblock size is set to a value equalto the macroblock size of the previous picture and a second picture isdecoded.

In a method of decoding default_MBsize, which is the informationindicating the reference macroblock size, or MB_size, which isinformation indicating the macroblock size of the current picture, anentropy-decoded value can be used as the macroblock size and themacroblock size can be obtained through an enlargement or a reductionfrom a predetermined size by using the entropy-decoded value as anenlarging ratio or a reducing ratio. Alternatively, as described in theaforementioned first decoding method, when the video encoding apparatusencodes a value generated by applying a log function to the macroblocksize value, the macroblock size value may be obtained using anexponential function.

Further, when the video encoding apparatus decodes magnifications of thehorizontal size and the vertical size, respectively, the referencemacroblocksize can be obtained by entropy-decoding the magnifications ofthe horizontal size and the vertical size, respectively.

In addition, when an index value of a prearranged table between thevideo encoding apparatus and the video decoding apparatus is encoded,the reference macroblock size can be obtained by using a decoded valueas the index value of the table.

In this event, the reference macroblock size can be decoded usingvarious binary coding methods such as a unary code, a truncated unarycode, an Exp-Golomb code, etc.

Further, when macroblock size information corresponds to information onthe minimum subblock size and the maximum partition layer, minimumsubblock size information and maximum partition layer information areentropy-decoded from the bitstream and then the macroblock size isdecoded.

In a method of decoding default_minBlockSize, which is the informationindicating the reference minimum subblock size, or minblockSize, whichis information indicating the minimum subblock size of the currentpicture, an entropy-decoded value can be used as the minimum subblocksize and the minimum subblock size can be obtained through anenlargement or a reduction from a predetermined size by using theentropy-decoded value as an enlarging ratio or a reducing ratio.Alternatively, as described in the aforementioned first decoding method,when the video encoding apparatus encodes a value generated by applyinga log function to the minimum subblock size value, the minimum subblocksize value may be obtained using an exponential function.

Further, when the video encoding apparatus decodes magnifications of thehorizontal size and the vertical size, respectively, the referenceminimum subblock size can be obtained by entropy-decoding themagnifications of the horizontal size and the vertical size,respectively.

In addition, when an index value of a prearranged table between thevideo encoding apparatus and the video decoding apparatus is encoded,the reference minimum subblock size can be obtained by using a decodedvalue as the index value of the table.

In this event, the reference minimum subblock size can be decoded usingvarious binary coding methods such as a unary code, a truncated unarycode, an Exp-Golomb code, etc.

The maximum partition layer information can be decoded by using alossless compression coding such as a binary arithmetic coding, aHuffman coding, etc., and various methods such as a unary code, atruncated unary code, an Exp-Golomb code, etc.

When the reconstructed minimum subblock size is N×N and the maximumpartition layer is x, the macroblock size is (N×2^(x))×(N×2^(x)).

D-2-2-5) Macroblock Size Information Decoding Method 5

Hereinafter, a decoding method according to the fifth method of encodingthe macroblock size is described.

According to the fifth method, macroblock sizes of the intra picture andthe inter picture are extracted from prearranged positions within thebitstream between the video encoding apparatus and the video decodingapparatus, respectively, and a macroblock size according to the picturetype is set.

Flags indicating whether to decode a macroblock size for the intrapicture and indicating whether to decode a macroblock size for the interpicture are reconstructed in the sequence header or the picture header,respectively, and then the macroblock size for the intra picture or theinter picture is decoded according to a value of the flag through thebitstream or the image is reconstructed using a prearranged macroblocksize.

A method of decoding information on the macroblock size of the intrapicture and the macroblock size of the inter picture may be used incombination with the aforementioned decoding methods according to theaforementioned encoding methods.

Further, when information on the intra macroblock size or the intermacroblock size corresponds to information on the minimum subblock sizeand the maximum partition layer, minimum subblock size information andmaximum partition layer information are entropy-decoded from thebitstream and then the macroblock size is decoded.

A method of decoding information on the minimum subblock size of theintra picture or the minimum subblock size of the inter picture can beused in combination with the aforementioned decoding methods accordingto the aforementioned encoding methods.

The maximum partition layer information can be decoded by using alossless compression coding such as a binary arithmetic coding, aHuffman coding, etc., and various methods such as a unary code, atruncated unary code, an Exp-Golomb code, etc.

When the reconstructed minimum subblock size is N×N and the maximumpartition layer is x, the macroblock size is (N×2^(x))×(N×2^(x)).

D-2-3) Flowchart for Illustrating Decoding Operation

Meanwhile, a video decoding method according to an aspect of the presentdisclosure may include extracting information on a macroblock size fromthe bitstream and configuring a macroblock size by using the extractedinformation in step S3810, extracting encoded image data from thebitstream and generating a reconstructed image by decoding the encodedimage data according to a block size identified by information on theblock size in step S3820.

It will be apparent to those skilled in the art that respective aspectsof determining the macroblock size and encoding and decoding informationon the macroblock size can be implemented in various manners bycombining them with respective aspects of splitting the macroblock andencoding and decoding macroblock partition information according to theaforementioned aspects of the present disclosure.

Main features of the present disclosure are summarized as follows.

Employing blocks having a variable size (e.g. macroblock, which is theencoding/decoding units)

Determining a block size having a variable size and encoding sizeinformation

Splitting a block having a determined size into subblocks and encodingpartition information

Meanwhile, as an example of the macroblock split according to aspects ofthe present disclosure, the splitting for the prediction or thetransform has been described in the aforementioned aspects. However, theprediction or the transform is only an example to which the splittingcan be applied, but the macroblock can be split for various purposes inaddition to the prediction or the transform. Further, a subject to besplit is not only the macroblock but also any image area. For example,even when a block having a predetermined size, which corresponds to theprediction unit, is split into subblocks for an efficient transform, thesplitting according to the aspects of the present disclosure can beused.

In other words, the present disclosure provides various splittingmethods and a method and an apparatus for efficiently encoding anddecoding information on the splitting when it is required to split animage block into subblocks for any purpose.

Meanwhile, a video encoding/decoding apparatus according to an aspect ofthe present disclosure can be implemented by connecting an inputterminal of a video decoding apparatus according to an aspect of thepresent disclosure with an output terminal of a video decoding apparatusaccording to an aspect of the present disclosure.

A video encoding/decoding apparatus according to an aspect of thepresent disclosure includes a video encoder for encoding an imagethrough generating an encoded image data by encoding a current blockpartitioned into a plurality of subblocks and generating an encodedpartition information data by encoding a partition information of thecurrent block; and a video decoder for decoding the image throughreconstructing the partition information of the current block bydecoding the encoded partition information data extracted from abitstream and reconstructing the current block partitioned into theplurality of subblocks by decoding the encoded image data extracted fromthe bitstream, according to a reconstructed partition information of thecurrent block.

A video encoding/decoding method according to an aspect of the presentdisclosure includes encoding an image through generating an encodedimage data by encoding a current block partitioned into a plurality ofsubblocks and generating an encoded partition information data byencoding a partition information of the current block; and decoding theimage through reconstructing the partition information of the currentblock by decoding the encoded partition information data extracted froma bitstream and reconstructing the current block partitioned into theplurality of subblocks by decoding the encoded image data extracted fromthe bitstream, according to a reconstructed partition information of thecurrent block.

In the description above, although all of the components of theembodiments of the present disclosure may have been explained asassembled or operatively connected as a unit, the present disclosure isnot intended to limit itself to such embodiments. Rather, within theobjective scope of the present disclosure, the respective components maybe selectively and operatively combined in any numbers. Every one of thecomponents may be also implemented by itself in hardware while therespective ones can be combined in part or as a whole selectively andimplemented in a computer program having program modules for executingfunctions of the hardware equivalents. Codes or code segments toconstitute such a program may be easily deduced by a person skilled inthe art. The computer program may be stored in computer readable media,which in operation can realize the aspects of the present disclosure. Asthe computer readable media, the candidates include magnetic recordingmedia, optical recording media, and carrier wave media.

In addition, terms like ‘include’, ‘comprise’, and ‘have’ should beinterpreted in default as inclusive or open rather than exclusive orclosed unless expressly defined to the contrary. All the terms that aretechnical, scientific or otherwise agree with the meanings as understoodby a person skilled in the art unless defined to the contrary. Commonterms as found in dictionaries should be interpreted in the context ofthe related technical writings not too ideally or impractically unlessthe present disclosure expressly defines them so.

Although exemplary aspects of the present disclosure have been describedfor illustrative purposes, those skilled in the art will appreciate thatvarious modifications, additions and substitutions are possible, withoutdeparting from essential characteristics of the disclosure. Therefore,exemplary aspects of the present disclosure have not been described forlimiting purposes. Accordingly, the scope of the disclosure is not to belimited by the above aspects but by the claims and the equivalentsthereof.

INDUSTRIAL APPLICABILITY

As described above, the present disclosure is highly useful forapplication in the fields of an image compression processing forencoding and decoding a high resolution video by efficiently encodingand decoding block partition information in encoding a high resolutionimage by using variable sized macroblocks, which generates an effect ofimproving the compression efficiency.

The invention claimed is:
 1. A method performed by a video encodingapparatus for encoding a video in a unit of blocks, the methodcomprising: encoding, into a bitstream, a first information indicating aminimum block size and a second information indicating an enlargingratio relative to the minimum block size; and dividing a square currentblock having a maximum block size into one or more subblocks which areequal to or larger than the minimum block size by a tree structure, andencoding, into the bitstream, partition information of the current blockdivided by the tree structure, wherein the maximum block size isidentical to a size enlarged from the minimum block size by theenlarging ratio, wherein the encoding of the partition informationcomprises: encoding, into the bitstream, a partition flag indicatingwhether or not each node of the tree structure, starting from a node ofan uppermost layer corresponding to the current block, is divided intofour nodes of a lower layer, wherein the partition flag indicatingwhether a node, which corresponds to a block having the minimum subblocksize, is divided is not encoded into the bitstream.
 2. The method ofclaim 1, wherein the maximum block size is determined from among 16*16,32*32 and 64*64.
 3. The method of claim 1, wherein when a node isdivided into nodes of a lower layer, a block corresponding to the nodeis divided into four equal-sized square blocks corresponding to thenodes of the lower layer.
 4. The method of claim 1, wherein thepartition flag is encoded by a binary arithmetic coding.
 5. A videoencoding apparatus of encoding a video in a unit of blocks, theapparatus comprising a microprocessor configured to: encode, into abitstream, a first information indicating a minimum block size and asecond information indicating an enlarging ratio relative to the minimumblock size; divide a square current block having a maximum block sizeinto one or more subblocks which are equal to or larger than the minimumblock size by a tree structure, wherein the maximum block size isidentical to a size enlarged from the minimum block size by theenlarging ratio, and encode, into the bitstream, partition informationrelated to dividing the current block into the one or more subblocks, byencoding a partition flag indicating whether or not each node of thetree structure, starting from a node of an uppermost layer correspondingto the current block, is divided into four nodes of a lower layer_(s)wherein the partition flag indicating whether a node, which correspondsto a block having the minimum subblock size, is divided is not encodedinto the bitstream.
 6. The apparatus of claim 5, wherein the maximumblock size is determined from among 16*16, 32*32 and 64*64.
 7. Theapparatus of claim 5, wherein when a node of the tree structure isdivided into nodes of a lower layer, a block corresponding to the nodeis divided into four equal-sized square blocks corresponding to thenodes of the lower layer.
 8. The apparatus of claim 5, wherein thepartition flag is encoded by a binary arithmetic coding.